#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Error

I get the following error when I add the On Error GoTo
command into VBA in Excel. "The instruction
at "0x3004c359" referenced memory at "0x032c0714". The
memory could not be read." Excel closes, but is left as a
process running that I have to end through the Windows
Task Manager.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VBA Error

always helpful to the list to post your code

"Jason" wrote in message
...
I get the following error when I add the On Error GoTo
command into VBA in Excel. "The instruction
at "0x3004c359" referenced memory at "0x032c0714". The
memory could not be read." Excel closes, but is left as a
process running that I have to end through the Windows
Task Manager.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Error

Everything runs just fine until I try and save the spreadsheet under a
different name and/or a different directory. Then I get the same error
I referenced in the initial posting. So to alleviate that problem, I
was trying to get it to simply bypass the procedure calls, because I
don't want copies of the spreadsheet to update the file anyway.

Adding the On Error GoTo commands causes the error mentioned.
____________
Private Sub Workbook_Open()
Call copy
End Sub

Sub copy()
On Error GoTo Last
FileCopy "\\0.0.0.0\customer\data.txt", "c:\cabg\data.txt"
Call upload
Exit Sub
Last:
End Sub

Sub upload()
On Error GoTo Last2
With
ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\c abg\data.txt", _
Destination:=Range("A2"))
.Name = "cabg"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = False
.AdjustColumnWidth = False
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.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)
.Refresh BackgroundQuery:=False
End With

Exit Sub
Last2:
End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Excel 2007 - error saving file & error loading dll TinaF Excel Discussion (Misc queries) 0 July 1st 09 01:49 PM
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Error of slope taking into account error of the data points cer144 Excel Worksheet Functions 5 July 7th 08 07:26 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM


All times are GMT +1. The time now is 05:41 PM.

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"