Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Path/File Access Error

Hi,

I get an Error message saying "Path/File Access Error" when i try
to create a new worksheet in a macro. The same macro works fine on my
machine, and we tested in 3-4 other machines. It fails only on a
particular machine. following is the code sample that causes the
problem.

Dim Sheet As Worksheet
Set Sheet = Sheets.Add(Type:=ThisWorkbook.Path & "\Report.xlt")

where Report.xlt is a template file that is stored in the same location
as the Excel file itself. Can anyone please help me figure out what
might be wrong. The code fails even when I create the worksheet without
using a template("Report.xlt). That is by using the following code

Dim Sheet As Worksheet
Set Sheet = Sheets.Add

Thanks.
Geetha

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Path/File Access Error

Geetha,
I can't duplicate your error with a variety of bad paths etc.
What does ThisWorkbook.Path evaluate to ?
Something strange about the permissions on that folder ?

NickHK

"Geetha" wrote in message
oups.com...
Hi,

I get an Error message saying "Path/File Access Error" when i try
to create a new worksheet in a macro. The same macro works fine on my
machine, and we tested in 3-4 other machines. It fails only on a
particular machine. following is the code sample that causes the
problem.

Dim Sheet As Worksheet
Set Sheet = Sheets.Add(Type:=ThisWorkbook.Path & "\Report.xlt")

where Report.xlt is a template file that is stored in the same location
as the Excel file itself. Can anyone please help me figure out what
might be wrong. The code fails even when I create the worksheet without
using a template("Report.xlt). That is by using the following code

Dim Sheet As Worksheet
Set Sheet = Sheets.Add

Thanks.
Geetha



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
Path/File access error Ayo Excel Discussion (Misc queries) 1 June 8th 08 08:47 PM
Path/file access error Scott Excel Programming 5 July 22nd 06 01:58 PM
Path/File access error Scott Excel Programming 0 June 8th 06 03:35 PM
Run-time error 75 Path/File access error Casey[_89_] Excel Programming 2 May 9th 06 07:20 PM
Path/File Access Error Ajit[_3_] Excel Programming 3 April 15th 04 06:40 PM


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