Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Excel VBA Macro

Hello,

I just wanna check if this excel VBA statement is correct:

Const DataPath = "U:\DATA\PROGRAM\"

Workbooks.Open Filename:=DataPath + "MOPS.XLS"

I need your advise. Thanks.

Sheela
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Excel VBA Macro

Hi Sheela,

Yes, it is syntactically correct.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Sheela" wrote in message
...
Hello,

I just wanna check if this excel VBA statement is correct:

Const DataPath = "U:\DATA\PROGRAM\"

Workbooks.Open Filename:=DataPath + "MOPS.XLS"

I need your advise. Thanks.

Sheela



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel VBA Macro

Workbooks.open DataPath & "Mops.xls"
Use & to join strings together
Hope this helps
Stuart
-----Original Message-----
Hello,

I just wanna check if this excel VBA statement is correct:

Const DataPath = "U:\DATA\PROGRAM\"

Workbooks.Open Filename:=DataPath + "MOPS.XLS"

I need your advise. Thanks.

Sheela
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Excel VBA Macro

Hi Sheela,

I have tested your code in Excel 2000 and it runs fine for me. Exactly
what error are you getting? Is the error occurring on the workbooks.open
line? Are you sure that the specified path is valid on the machine where the
code is executing, that the specified workbook exists in that path, and that
the profile you are logged in with has full permissions to this location?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"sheela" wrote in message
...
Well, I tried that but it is still giving the error.
Actually, this macro was created in Excel 95. I want to
run in Excel 2000 and it gives me an error.

Sheela

-----Original Message-----
Workbooks.open DataPath & "Mops.xls"
Use & to join strings together
Hope this helps
Stuart
-----Original Message-----
Hello,

I just wanna check if this excel VBA statement is

correct:

Const DataPath = "U:\DATA\PROGRAM\"

Workbooks.Open Filename:=DataPath + "MOPS.XLS"

I need your advise. Thanks.

Sheela
.

.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Excel VBA Macro

Rob,

I will send you the file to your email add to give you a
better picture on the problem I'm facing.

Sheela

-----Original Message-----
Hi Sheela,

I have tested your code in Excel 2000 and it runs

fine for me. Exactly
what error are you getting? Is the error occurring on

the workbooks.open
line? Are you sure that the specified path is valid on

the machine where the
code is executing, that the specified workbook exists in

that path, and that
the profile you are logged in with has full permissions

to this location?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"sheela" wrote in message
...
Well, I tried that but it is still giving the error.
Actually, this macro was created in Excel 95. I want to
run in Excel 2000 and it gives me an error.

Sheela

-----Original Message-----
Workbooks.open DataPath & "Mops.xls"
Use & to join strings together
Hope this helps
Stuart
-----Original Message-----
Hello,

I just wanna check if this excel VBA statement is

correct:

Const DataPath = "U:\DATA\PROGRAM\"

Workbooks.Open Filename:=DataPath + "MOPS.XLS"

I need your advise. Thanks.

Sheela
.

.



.

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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM


All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"