Help with DIM and using

Man, I need to re-read all my VBA books & training videos again!

If you can help me with this question I would really appreciate it.

I am wanting to create and populate a variable


  • 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:

    Dim TheString As String
    TheString = "01"

    More commonly you may want this variable to be something the user enters, which would be:

    TheString = InputBox("Input the number here: ")

    Then to use it:

    .SourceDataFile = "U:POLL" & TheString & "misc.dbf"

    Hope this helps someone, if not you. Regards, Dai

    Do or do not, there is no try. |
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion