Hi Folks,
Why would the line of code below hang on one machine but run smoothly
on another machine? Both machines have WinXP and both have Excel
2000.
Workbooks("EstimatedBillingForms4").Close
SaveChanges:=False
TIA,
Don G
Hi Folks,
Why would the line of code below hang on one machine but run smoothly
on another machine? Both machines have WinXP and both have Excel
2000.
Workbooks("EstimatedBillingForms4").Close
SaveChanges:=False
TIA,
Don G
Hi Don, when you say hang do you mean the application stops responding ? Or do you get a syntax error ?
If the latter then one machine may require the file extension be added to the workbook name eg
Workbooks("EstimatedBillingForms4.xls").Close SaveChanges:=False
I believe that this maybe because MS Excel takes the workbook name from the Explorers default view i.e Show/Hide file extension.
Try adding .xls to the workbook name:
Workbooks("EstimatedBillingForms4.xls").Close SaveChanges:=False
There's a windows setting for each pc to hide/show extensions. Depending on
that setting, specifying the workbook name without the extension can confuse
excel.
I've never seen it fail if I always included the extension.
"Don G - ExcelForums.com" wrote:
>
> Hi Folks,
>
> Why would the line of code below hang on one machine but run smoothly
> on another machine? Both machines have WinXP and both have Excel
> 2000.
>
>
> Workbooks("EstimatedBillingForms4").Close
> SaveChanges:=False
>
> TIA,
>
> Don G
--
Dave Peterson
Thanks Dave.....As soon as the office opens up, I'll give that a try and post
back if that's the cure.
Don
"Dave Peterson" wrote:
> Try adding .xls to the workbook name:
>
> Workbooks("EstimatedBillingForms4.xls").Close SaveChanges:=False
>
> There's a windows setting for each pc to hide/show extensions. Depending on
> that setting, specifying the workbook name without the extension can confuse
> excel.
>
> I've never seen it fail if I always included the extension.
>
> "Don G - ExcelForums.com" wrote:
> >
> > Hi Folks,
> >
> > Why would the line of code below hang on one machine but run smoothly
> > on another machine? Both machines have WinXP and both have Excel
> > 2000.
> >
> >
> > Workbooks("EstimatedBillingForms4").Close
> > SaveChanges:=False
> >
> > TIA,
> >
> > Don G
>
> --
>
> Dave Peterson
>
Dave,
That did the trick. Program works great on both machines now just by adding
the .xls extension as you suggested.
Thanks very much for your help,
Don
"Dave Peterson" wrote:
> Try adding .xls to the workbook name:
>
> Workbooks("EstimatedBillingForms4.xls").Close SaveChanges:=False
>
> There's a windows setting for each pc to hide/show extensions. Depending on
> that setting, specifying the workbook name without the extension can confuse
> excel.
>
> I've never seen it fail if I always included the extension.
>
> "Don G - ExcelForums.com" wrote:
> >
> > Hi Folks,
> >
> > Why would the line of code below hang on one machine but run smoothly
> > on another machine? Both machines have WinXP and both have Excel
> > 2000.
> >
> >
> > Workbooks("EstimatedBillingForms4").Close
> > SaveChanges:=False
> >
> > TIA,
> >
> > Don G
>
> --
>
> Dave Peterson
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks