VS 2005 Declaration error

Hi

I am getting an error on the following variable even though it has been declared
   Dim strFirstInstance As String

It works in VBA but not in VS 2005 VB

Thanks
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Wayne Taylor (webtubbs)Connect With a Mentor Commented:
Hi murbro,

You cannot declare a variable of the same name twice within a routine. Either rename the variable, or re-use the original variable, and remove the second declaration altogether.

Regards,

Wayne
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>I am getting an error
can you show the full error, and on which (other) line it is shown?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.