pass 2 variables to a proceedure

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

I assume that this is an easy question, but how do I pass 2 variables to a
proceedure? Right now I have the following proceedure:
Public Sub Make_Link(docname As String)

After some changes to code, I now need to be able to bring in 2 variables.
I thought that to do this I would just change it to this:
Public Sub Make_Link(docname As String, comment As String)

This won't work. Am I missing something simple here? Thanks in advance for
your help!
 
Your calling syntax is incorrect, you need the "Call" statement when you use
parens "()":

Call Make_Link(docname, strcomment)

Or you can just lose the parens:

Make_Link docname, strcomment

Otherwise VB thinks its a function returning a value (hence "Expected:=")...
 
Back
Top