How can you have done so much coding without relying on variables? Bizarre. Well I'm guessing it's too late now, but for reference's sake, this is how you declare and assign a value to a variable in VBA:
[code] Dim TheString As String TheString = "01" [/code]
More commonly you may want this variable to be something the user enters, which would be:
[code] TheString = InputBox("Input the number here: ") [/code]
Comments
[code]
Dim TheString As String
TheString = "01"
[/code]
More commonly you may want this variable to be something the user enters, which would be:
[code]
TheString = InputBox("Input the number here: ")
[/code]
Then to use it:
[code]
.SourceDataFile = "U:POLL" & TheString & "misc.dbf"
[/code]
Hope this helps someone, if not you. Regards, Dai
------------------------------------------
Do or do not, there is no try. |
------------------------------------------