Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created this Macro, but want to make a change but dont know how..
Hopefully someone can offer assitance. Question1. Instead of it looking for the file 1.csv, I want to look for all .CSV files on my desktop, and allow me to choose the one to import --------------------------------------------------------------------------------------------------- Sub Macro3() ' ' Macro3 Macro ' Macro recorded 4/5/2012 ' Keyboard Shortcut: Ctrl+d ' With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\my.computer\Desktop\1.csv", Destination _ :=Range("A1")) .Name = "1" .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 = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With End Sub ------------------------------------------------------------------------------------------ Thankss.. --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://www.shemes.com/ =- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro needed please | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to set macro security in Excel to minimum | Excel Programming | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |