Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've written a macro with a getDirectory(StrPath) so that the user can choose
where to get the txt file to import from. The problem is that it works fine on my PC as well as a laptop but for some reason don't work on a workstation where I tried to implement the code. With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;" & StrPath, Destination _ :=Range("A1")) .Name = "SeeName" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = False .TextFileSemicolonDelimiter = True .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 9) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With Can someone please help me to correct this so that I can implement the application on any machine. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace VBA run-time error message with custom message | Excel Programming | |||
error message: compile error, argument not optional | Excel Programming | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
Problem with textfileplatform | Excel Programming |