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 Macro error when file not found

I have the following Excel macro:

Sub NewExcelWithWorkbook()
Dim oXL As Object
Dim oWB As Object

Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
Set oWB = oXL.Workbooks.Open("C:\documents and settings\default\my
documents\classhandouts.xls")
End Sub

This path works on my PC, but does not work on my daughters as her folder for
\my documents\ is in the path C:\Documents and Settings\User\My Documents

1st question . . . Is there different paths used by Microsoft, or has someone
simply moved things around ?

2nd question . . . When my macro encounters an error, is there a way of
automatically retrying the second path ?

3rd question . . . If Microsoft does use different paths to \my documents\
how do I then solve this problem ?

I am sure someone in your group can help me as they have in the past.

Thanks Much
Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via http://www.officekb.com

 
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
R/T error 53 - File Not Found JMay Excel Discussion (Misc queries) 4 October 22nd 08 02:56 PM
Installation Error: File Not Found I h8 sku112.cab New Users to Excel 2 September 25th 08 10:58 PM
Installation Error: File not Found jwill_03 Excel Discussion (Misc queries) 0 November 6th 07 09:59 PM
How to change closed file name - Error: file not found PGM Excel Programming 5 April 18th 06 02:07 PM
File not found - error Piranha[_39_] Excel Programming 18 September 19th 05 02:18 AM


All times are GMT +1. The time now is 03:04 AM.

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"