Help with DIM and using - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Help with DIM and using

EwingerKEwingerK Posts: 1Member
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


  • DaiMitnickDaiMitnick Posts: 77Member
    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.