Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
signed over-punch ALEX Excel Worksheet Functions 1 January 8th 07 05:52 PM
Importing signed over-punch text into Excel ALEX Excel Worksheet Functions 2 January 4th 07 03:18 PM
How to create a workbook from a signed addin that is itself signed willhandley Excel Programming 3 November 9th 06 02:47 PM
Workbook Created By Signed Addin Is Itself Not Signed willhandley Excel Discussion (Misc queries) 0 November 5th 06 06:53 PM
Can't make loop macro work - help? [email protected] Excel Programming 1 October 11th 06 03:23 PM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"