Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to put variable in text line (ClientNumber)?

Status
Not open for further replies.

mikeburg

Technical User
Jun 19, 2003
23
US
I have a input box as follows:

Public ClientNumber As String
ClientNumber = Application.InputBox("Enter A/R Client
Number in 4 digits (ex: 0195): ")

What is the proper syntax to get the ClientNumber entered in the input box to work in a file name to be retrieved?
(the following will not work)

With ActiveSheet.QueryTables.Add
(Connection:="TEXT;C:\usr\mike\CL"ClientNumber".MB", _
Destination:=Range("A1"))

Thanks,

Mike
 
Something like this ?
(Connection:="TEXT;C:\usr\mike\CL" & ClientNumber & ".MB", _

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top