[visualbasic-l] Excel 2007 Throwing Error 462 'Server Error' in a Piece of VB6 Code

Question from epurdy on Jan 4 at 12:33 PM
The error says "remote server machine does not exist or is unavailable". A bogus error since everything is being done on my local PC.

I am running VB6 and Excel 2010 The code segment below is where the error is being thrown. This code works with Excel 2003, not with Excel 2007. The error occurs at the line Range("B4:H204").Select
What changes are necessary to make this run with Excel 2007.

Set oWkbobj = CreateObject("Excel.Application")
Set oWkbkObj = oWkbobj.Workbooks.Open(App.Path & \TX_Tests_all_real_data.xls")

oWkbobj.Visible = False

' clear all 32 worksheets
For iIdx = 1 To UBound(tx_wkbk_array)
oWkbkObj.Sheets(tx_wkbk_array(iIdx)).Select
Range("B4:H204").Select
Selection.ClearContents
Selection.NumberFormat = "0.00"
Range("B4").Select
Next iIdx
 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
epurdy  

achievements
 
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

No comments:

Post a Comment