recognising variables???

mahmudich

Registered User.
Local time
Today, 16:34
Joined
Feb 10, 2003
Messages
73
Hi guys!

I’m trying to write nice VB code. For example a have ComboBoxes named Book1, Book2, Book3 etc and also I have a Sub, which is suppose to activate different things depending on what Book number is that. The worst thing would be to use Select Case statement. But what if the Sub has incoming parameters like:

Private Sub BookNumbers(intBookNumber as Integer)

End Sub


My question is how to write following thing:

Me![Book & intBookNumber & ] = ‘whatever

Variable inside square brackets isn’t recognised.

…waiting for your ideas
 
The right syntax is: Me("Book" & intBookNumber).value = 'whatever

HTH
 
Excellent!

thank you
 

Users who are viewing this thread

Back
Top Bottom