Click here to Skip to main content
14,932,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In VB I created a messaging subroutine that works everywhere except in a private subroutine where I get the error message : BC30469 Reference to a non-shared member requires an object reference. How do I make an object reference to a subroutine that passes a string everywhere else except in the private sub in the while try loop?

Msg("Da Sender" + sendNo + senderInfo)

All are declared as strings and the sub processes a string output

Thank you

What I have tried:

Moving it public, into the main sub, etc.
Posted
Updated 31-Jan-21 2:37am

1 solution

The error message is telling you that some item you are trying to use (sendNo or senderInfo I assume) is a member of a class. So in order to refer to it you need a reference to an object of the class, or your subroutine needs to be a member of the class..
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900