ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox Useage (https://www.excelbanter.com/excel-programming/281774-msgbox-useage.html)

Jeff[_24_]

MsgBox Useage
 
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



glenner003

MsgBox Useage
 
"Jeff" wrote in message
...
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



Tom Ogilvy

MsgBox Useage
 
You don't need chdir Curdir

That does nothing.

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




--
Regards,
Tom Ogilvy


"glenner003" wrote in message
.be...
"Jeff" wrote in message
...
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






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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com