Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Inhibit use of the function "Connections" on Excel 2007 Andrea Proietti Neri Setting up and Configuration of Excel 0 January 7th 10 06:28 PM
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
inhibit input Pastel Hughes Excel Discussion (Misc queries) 1 April 24th 06 09:13 PM
HOW SHOULD I IMPORT & PASTE ONLY THE REQUIRED DATA amar kayala Excel Discussion (Misc queries) 0 January 6th 06 01:45 PM
Inhibit Cut (allow Copy) duncan Excel Programming 3 March 29th 05 09:00 AM


All times are GMT +1. The time now is 05:23 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"