PC Review


Reply
Thread Tools Rate Thread

Different path

 
 
Marc Gendron
Guest
Posts: n/a
 
      10th Apr 2008
Hi guys,

A snip of code to open a workbook or create one if it does not exist.

On Error GoTo CreateNewWorkbook
Application.ScreenUpdating = False
Workbooks.Open directory & filetext

Why does Excel keep poppin'up saying ".....cannot be found. Check your
spelling, or try a different path.


It does open my workbook if it exists, or it does go to "Create Workbook"
and creates my workbook if not. Works fine. The only bug is the pop-screen.

Well, you guys are the different path I'm trying.

Thanks in advance
Marc

 
Reply With Quote
 
 
 
 
crferguson@gmail.com
Guest
Posts: n/a
 
      10th Apr 2008
On Apr 10, 7:50*am, Marc Gendron
<MarcGend...@discussions.microsoft.com> wrote:
> Hi guys,
>
> A snip of code to open a workbook or create one if it does not exist.
>
> On Error GoTo CreateNewWorkbook
> * * Application.ScreenUpdating = False
> * * Workbooks.Open directory & filetext
>
> Why does Excel keep poppin'up saying ".....cannot be found. Check your
> spelling, or try a different path.
>
> It does open my workbook if it exists, or it does go to "Create Workbook"
> and creates my workbook if not. Works fine. *The only bug is the pop-screen.
>
> Well, you guys are the different path I'm trying.
>
> Thanks in advance
> Marc


Instead of wrapping the text with Application.ScreenUpdating=False,
use Application.DisplayAlerts=False. Be sure to use
Application.DisplayAlerts=True at the end of the code though! I'd put
it right after the Workbooks.Open line as well as in the
CreateNewWorkbook code in case it finishes out there.

Thanks,
Cory
 
Reply With Quote
 
Marc Gendron
Guest
Posts: n/a
 
      10th Apr 2008
Thanks Cory

Works perfect !

Marc

"(E-Mail Removed)" wrote:

> On Apr 10, 7:50 am, Marc Gendron
> <MarcGend...@discussions.microsoft.com> wrote:
> > Hi guys,
> >
> > A snip of code to open a workbook or create one if it does not exist.
> >
> > On Error GoTo CreateNewWorkbook
> > Application.ScreenUpdating = False
> > Workbooks.Open directory & filetext
> >
> > Why does Excel keep poppin'up saying ".....cannot be found. Check your
> > spelling, or try a different path.
> >
> > It does open my workbook if it exists, or it does go to "Create Workbook"
> > and creates my workbook if not. Works fine. The only bug is the pop-screen.
> >
> > Well, you guys are the different path I'm trying.
> >
> > Thanks in advance
> > Marc

>
> Instead of wrapping the text with Application.ScreenUpdating=False,
> use Application.DisplayAlerts=False. Be sure to use
> Application.DisplayAlerts=True at the end of the code though! I'd put
> it right after the Workbooks.Open line as well as in the
> CreateNewWorkbook code in case it finishes out there.
>
> Thanks,
> Cory
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
doskey doesn't work; PATH only sets after first Java compile; then resets to old PATH joe Windows XP Help 4 14th May 2008 02:55 PM
how to judge whether a path is relative path or absolute path thinktwice Microsoft Windows 2000 CMD Promt 20 7th May 2008 11:06 PM
An exception occurred in the OnBeforeInstall event handler of <name> Access to the path <path> is denied. Andrzej Lipski Microsoft Dot NET 0 5th Oct 2007 04:24 PM
set path, change path - path grayed out John Smith Windows XP Help 1 12th Feb 2005 01:56 PM
set path, change path - path grayed out John Smith Windows XP General 1 12th Feb 2005 01:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:03 PM.