Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
make signed over-punch conversion work in a macro
Sub VBA()
' ' VBA Macro ' Macro recorded 1/3/2007 by Alex ' ' With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\Owner\Desktop\DLTest.txt", Destination:= _ Range("A1")) .Name = "DLTest" .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 = xlFixedWidth .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 5, 2, _ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 5) .TextFileFixedColumnWidths = Array(1, 10, 5, 12, 7, 8, 11, 30, 2, 5, 3, 2, 6, 6, 6, 6, 6, 12, 15, 8, 1, _ 18, 1, 15, 3, 3, 10, 6, 12, 15, 12, 7, 2, 2, 8, 1, 3, 1, 1, 1, 2, 2, 1, 2, 10, 5, 1, 15, 4, 1, 6, 1, 9, 26, 6, 6) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With ActiveWindow.SmallScroll Down:=-9 Range("A1").Select Range("A1:AF69").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Rows("1:9").Select Selection.Delete Shift:=xlUp ActiveWindow.SmallScroll Down:=-15 Rows("1:1").Select Selection.Delete Shift:=xlUp ActiveWindow.SmallScroll Down:=30 Rows("52:59").Select Selection.Delete Shift:=xlUp ActiveWindow.SmallScroll Down:=-51 Rows("1:1").Select Selection.Insert Shift:=xlDown Call VBAHeader End Sub Where and what syntax to use in the above macro using VBA? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
make signed over-punch conversion work in a macro
Alex,
No idea what you subject line mean. Care to explain a bit more. And that code is VBA. What is wrong/do you want change ? NickHK "Alex" wrote in message ... Sub VBA() ' ' VBA Macro ' Macro recorded 1/3/2007 by Alex ' ' With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\Owner\Desktop\DLTest.txt", Destination:= _ Range("A1")) .Name = "DLTest" .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 = xlFixedWidth .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 5, 2, _ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 5) .TextFileFixedColumnWidths = Array(1, 10, 5, 12, 7, 8, 11, 30, 2, 5, 3, 2, 6, 6, 6, 6, 6, 12, 15, 8, 1, _ 18, 1, 15, 3, 3, 10, 6, 12, 15, 12, 7, 2, 2, 8, 1, 3, 1, 1, 1, 2, 2, 1, 2, 10, 5, 1, 15, 4, 1, 6, 1, 9, 26, 6, 6) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With ActiveWindow.SmallScroll Down:=-9 Range("A1").Select Range("A1:AF69").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Rows("1:9").Select Selection.Delete Shift:=xlUp ActiveWindow.SmallScroll Down:=-15 Rows("1:1").Select Selection.Delete Shift:=xlUp ActiveWindow.SmallScroll Down:=30 Rows("52:59").Select Selection.Delete Shift:=xlUp ActiveWindow.SmallScroll Down:=-51 Rows("1:1").Select Selection.Insert Shift:=xlDown Call VBAHeader End Sub Where and what syntax to use in the above macro using VBA? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
signed over-punch | Excel Worksheet Functions | |||
Importing signed over-punch text into Excel | Excel Worksheet Functions | |||
How to create a workbook from a signed addin that is itself signed | Excel Programming | |||
Workbook Created By Signed Addin Is Itself Not Signed | Excel Discussion (Misc queries) | |||
Can't make loop macro work - help? | Excel Programming |