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: 25
Default How to force Excel to complete one statement before executing othe

This is my problem:

I have two lines of statement in my VBA code as follows:

__________________________________________
line1: Shell("net use \\fs1\ipc$")

line2: Set db = OpenDatabase("\\fs1\test\abc.mdb", False, True, "MS
Access;PWD=12345")

Other lines follow here....
_________________________________________

When I execute the VBA code, sometimes I get a handle to the database and
sometimes I dont (I get a runtime error 3051 because there is a delay in
getting the handle to the database due to slow network).

When I debug this line by line, I dont get any error message.

I want to make Excel complete executing LINE1 (however long it takes on a
slow network) and then execute LINE2 . How do I make Excel do this?

I have been researching on this for the last 3 days. If anyone here can
help me on this, this would be of great help to me! Thanks in Advance!

 
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
need formula to return data from one column after comparing 2 othe Jeff W Excel Worksheet Functions 3 February 21st 08 02:25 PM
Not enough memory to run Microsoft Office Excel. Please close othe Krishna Prasad RVS Excel Discussion (Misc queries) 0 December 7th 07 09:35 AM
Not enough memory to run Microsoft Office Excel. Please close othe Krishna Prasad RVS Excel Discussion (Misc queries) 0 December 7th 07 09:33 AM
how do you shade every othe row in excel 2007 Ted @ Hirschmann Excel Discussion (Misc queries) 2 April 7th 07 09:34 AM
put on a eliptical fit for x-y points without a, b, e or the othe. ttopchu Excel Programming 0 November 5th 04 11:07 PM


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