Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 9th, 2004, 10:06 AM
Registered User
 
Join Date: Nov 2004
Location: Ashland, MA, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'Remote server machine does not exist...'

I have been running Excel automation code in Access to create some reporting. Specifically I am using code to send tables to an existing spreadsheet, open it, and run pivot table.
     Sometimes when this procedure runs it fails and I receive an error that the 'Remote server machine does not exist or is unavailable.' This occurs about half the time I run this process and occurs whether its run across a network or on a local machine. Does anyone know the cause of this or how to prevent it?
     Microsoft says it has to do with network settings which I don't buy because it happens when not on a network as well. Any suggestions are appreciated.
Reply With Quote
  #2 (permalink)  
Old December 13th, 2004, 05:09 AM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't really know the answer, but in the absence of other replies ...
it may be that the code is running too fast for the server. Try adding a line of code after that for the connection to delay activity eg. 3 seconds :-
Code:
Application.Wait Now + TimeValue("00:00:03")

-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.
Reply With Quote
  #3 (permalink)  
Old December 13th, 2004, 02:14 PM
Registered User
 
Join Date: Nov 2004
Location: Ashland, MA, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Interesting idea. I appreciate the help, I'll give it a try.
Reply With Quote
  #4 (permalink)  
Old December 29th, 2004, 09:29 AM
Registered User
 
Join Date: Dec 2004
Location: Ware, Herts, United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This looks like a new Microsoft problem (WinXP SP"??) because I've used GetObject/ CreateObject to do this kind of thing many times before without coming across this "" problem.

I am currently opening Word from Excel and popping in some data which then is converted into a table. It lets me convert the table (ie it finds the Word object) but gives the error when I ask it to change the column widths. If I manually take it through that stage it then carries on adding the rest of the data without any problem. Oh and I'm not doing this over a network (yet) - it's all on a one disk and one PC!

It works ok first time in a Windows session which makes me suspicious of the SP2 thing. I've set my object variable to Nothing so I don't think it's "untidiness". I'm using Office 2000 in WinXP but may get a chance later to run it in Office XP. (also I did read somewhere that Office 2003 has a CreateObject problem)

Regards

Rogen
Reply With Quote
  #5 (permalink)  
Old December 29th, 2004, 01:19 PM
Registered User
 
Join Date: Dec 2004
Location: Ware, Herts, United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've found the answer but possibly only to my own problem with "The remote server machine does not exist or is unavailable"

I've been checking my code and have realised I hadn't preceded use of the CentimetersToPoints method with my App object name as in wrdApp.CentimetersToPoints. Most of the code uses Excel's VBA routines but CentimetersToPoints is a Word method - whoops.

Still you never know - check your code??

Regards

Rogen
Reply With Quote
  #6 (permalink)  
Old June 13th, 2006, 09:19 AM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The last posting really did the trick in helping me out!
I was using (copy/pasted) code referencing ActiveDocument.Styles(wdStyleHeading8) to access a built-in style name - but ActiveDocument is not set in this context.
Instead, the document object I created earlier with CreateObject needed to be used, as in myWordDoc.Styles(wdStyleHeading8)
Quite an obvious coding error, actually - but the message not really helped tracking it down.
Reply With Quote
  #7 (permalink)  
Old November 4th, 2011, 02:08 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nothing works

The above ideas do not work in my case. I have the following code in Access, and it runs for the first time, but not for the second time. Any one knows the cause and solution?
I am using Office 2010. Thanks.

dim objChart as Excel.Chart
Set objChart = Excel.Charts.Add

--------------------------------------

I found this. http://support.microsoft.com/default.aspx?kbid=178510

Last edited by smithers; November 4th, 2011 at 02:34 AM.. Reason: found an answer
Reply With Quote
  #8 (permalink)  
Old September 13th, 2013, 09:05 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Check documents

I had a similar problem with a user trying to attach/open a Word document to a claim record in an MS Access database.. I discovered that the problem only occurred if the document being opened had been created in a previous version of MS Word to that currently in use (2010 in my case) and was being opened by VBA office automation code.
If you opened the document directly in MS Word 2010 there was no problem and if you then saved it as a .docx (ie 2010) document the vba office automation code worked without a hitch. Renaming .doc to .docx documents without first converting via Word 2010 did not work.
What I suspect is happening is that the office automation code is looking at the version of Word the document was created in and then trying to open this specific version of MS Word to display the document in. If that version of MS word is not available (because you have upgraded for instance) then it throws the error you see. This is onlay a guess
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retore Db from a remote machine to a local machine srkvellanki BOOK: Beginning SQL 0 October 3rd, 2008 05:17 PM
Error # 462 - Remote Server does not exist or is u doncar38 Word VBA 3 January 17th, 2008 08:04 AM
SQL Server Access across a remote machine rajen SQL Server 2000 3 July 27th, 2006 02:28 PM
Error 462 : Remote server doesn't exist ldk2004 BOOK: Expert One-on-One Access Application Development 0 December 17th, 2004 01:21 PM
'Remote server machine does not exist..." GandolftheWhite Pro VB Databases 0 November 15th, 2004 12:58 PM



All times are GMT -4. The time now is 11:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.