View Single Post
 
Old 11-17-2014, 09:10 AM
andrew12345 andrew12345 is offline Windows 7 32bit Office 2003
Novice
 
Join Date: Nov 2014
Posts: 4
andrew12345 is on a distinguished road
Default vba: user input named argument

Hi all,
How can I make a user have a choice how to parse csv data from another worksheet: sep comma or semicolon.
I have written the follwing line of code:
Sheets("calc").Range("B2:B" & LR).TextToColumns DataType:=xlDelimited, ConsecutiveDelimiter:=True, Comma:=True, DecimalSeparator:="."
Now my idea was to have the user enter either "Comma" or "Semicolon" into a variable via an Inputbox which I could then use in the named argument. However, Excel does not seem to accept a variable instead of a named argument, at least I don't know how to code it.
Can someone tell me how to code it, or give me another idea?
Thanks for your suggestions.
Andreas
Reply With Quote