MsgBox Useage

J

Jeff

Hello again,

Run into a bit of a snag

There was some code in place in the excel project I am working on.......

chdrive ("C")
chdir Curdir
msgbox "current working directory is ", CurDir

Now when I try run this macro (excel spreadsheet saved as excel 5.0/95, but
opened and edited in excel 2000, then saved back to 5.0) I get an
error...HELP!!! lol

It USED to work

The msgbox is a requirment of the project, to come up and tell the user
which directory their files are in

I need to get the msgbox working again using the curdir (currentdirectory)

Thanks in advance
Jeff
 
G

glenner003

Jeff said:
Hello again,

Run into a bit of a snag

There was some code in place in the excel project I am working on.......

chdrive ("C")
chdir Curdir
msgbox "current working directory is ", CurDir

Now when I try run this macro (excel spreadsheet saved as excel 5.0/95, but
opened and edited in excel 2000, then saved back to 5.0) I get an
error...HELP!!! lol

It USED to work

The msgbox is a requirment of the project, to come up and tell the user
which directory their files are in

I need to get the msgbox working again using the curdir (currentdirectory)

Thanks in advance
Jeff


Hi Jeff,

Just replace the komma with an ampersand (&) like this:

msgbox "current working directory is " & CurDir

Glenner003
 
T

Tom Ogilvy

You don't need chdir Curdir

That does nothing.

chdrive ("C")
msgbox "current working directory is " & CurDir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top