LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default .Refresh BackgroundQuery:=False


I get this error all the time. I ma trying to open bunch of DAT files
and stack tham in the excel sheet one after other. And i get this
message. When i am opening only one file it works fine, when i want to
do a for loop to go to the las file i specified it gives me this error
".Refresh BackgroundQuery:=False" Please Help. This is my code.

Private Sub CommandButton1_Click()

Dim intLastrow
Dim strFirstFileName
Dim intKiro

intLastrow = Cells(65536, 1).End(xlUp).Row

strFirstFileName = Application.GetOpenFilename

For intKiro = 0 To CInt(txtLastFileNumber.Text)

With ActiveSheet.QueryTables.Add(Connection:="TEXT;" &
strFirstFileName, Destination:=Cells(intLastrow + 1, 1))
..Name = "BENT 2 -Final00" & intKiro
..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, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
..TextFileTrailingMinusNumbers = True
*.Refresh BackgroundQuery:=False*
End With

Next intKiro


End Sub


--
ikirin
------------------------------------------------------------------------
ikirin's Profile: http://www.excelforum.com/member.php...o&userid=35599
View this thread: http://www.excelforum.com/showthread...hreadid=555625

 
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
.Refresh BackgroundQuery:=False ikirin[_5_] Excel Programming 0 June 26th 06 03:46 PM
Problems with .Refresh BackgroundQuery:=False dmplacebo Excel Programming 6 July 12th 05 02:00 PM
Problems with .Refresh BackgroundQuery:=False dmplacebo Excel Worksheet Functions 0 July 11th 05 12:39 PM
Web query .Refresh BackgroundQuery:=False problem Jim[_55_] Excel Programming 1 January 26th 05 04:08 PM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM


All times are GMT +1. The time now is 02:42 PM.

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

About Us

"It's about Microsoft Excel"