Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
text import inhibit required
As a relative newbie to macros I'd sure appreciate some help. 'I'
generated the macro using the macro recorder facility which recorded my use of the data/text import wizard. Works great! Only problem is that as soon as I open the template it immediatly asks me what text file I want to import. I'd like the template/worksheet to only initiate text import when I tell it to via a button or shortcut or whatever NOT immediately on opening. So, firstly I'd be very grateful for the answer and secondly could anyone recommend a good book that could provide me with such answers so that I don't have to waste your time on what is probably a trivial question (for you anyways). many thx in advance Danny |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
text import inhibit required
er...right.....hmmmm. thx for the reply. this is the macro:
Sub Macro1() ' ' Macro1 Macro ' Macro recorded 1/10/2005 by Daniel ' ' With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\Daniel\My Documents\test.txt", Destination:= _ Range("A2")) .Name = "test" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = xlWindows .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierNone .TextFileConsecutiveDelimiter = True .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = True .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1) .Refresh BackgroundQuery:=False End With Application.CommandBars("External Data").Visible = False End Sub many thx Danny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inhibit use of the function "Connections" on Excel 2007 | Setting up and Configuration of Excel | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
inhibit input | Excel Discussion (Misc queries) | |||
HOW SHOULD I IMPORT & PASTE ONLY THE REQUIRED DATA | Excel Discussion (Misc queries) | |||
Inhibit Cut (allow Copy) | Excel Programming |