Is there anyone out there that can teach me how to do this?
Is there anyone out there that can teach me how to do this?
Sometimes, the best way to learn is to turn the macro recorder on and then do
what you want manually.
Then turn the macro recorder off and look at the code.
Bob L wrote:
>
> Is there anyone out there that can teach me how to do this?
--
Dave Peterson
The easiest way to start is to use the Macro recorder to record yourself opening the csv file
form the menu select
Tools > Macro > Record New Macro
To access your recorded macro you will need to activate VB Editor this can be done by pressing Alt + f11 or by Tools > Macro Visual Basic Editor.
Once you have done this then if you require any more assistance in understanding or changes to the recorded code paste the code here & someone will assist you.
Your recorded macro will look something like this
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/03/2005 by Norm
ChDir "G:\Everyone\Robot\Act-Jit\Data"
Workbooks.Open Filename:= _
"G:\Everyone\Robot\Act-Jit\Data\05-03-07 - Report.csv"
End Sub
If you record a macro while doing you will get something you can boil down
to something like this.
Workbooks.OpenText Filename:=ActiveWorkbook.Path & "\" & [wbtoget],
Origin:=437, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=False _
Space:=False, Other:=True, OtherChar:=",", FieldInfo:=Array(Array(1, 1)
, _
TrailingMinusNumbers:=True
--
Don Guillett
SalesAid Software
donaldb@281.com
"Bob L" <Bob L@discussions.microsoft.com> wrote in message
news:C52100C6-9710-4247-9FC7-ABDA0B59945F@microsoft.com...
> Is there anyone out there that can teach me how to do this?
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks