ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save as Macro working for one computer but not the other? (https://www.excelbanter.com/excel-programming/357425-save-macro-working-one-computer-but-not-other.html)

Infinity[_3_]

Save as Macro working for one computer but not the other?
 

I have the following macro.

ACTIVEWORKBOOK.SAVEAS \"K:\COMM\INVEST\DAILY NBV NEW CALCULATIONS\\"
\"JAMES-DV\" & RIGHT(DATE, 2) & MID(DATE, 4, 2) & LEFT(DATE, 2

This macro is working fine on my computer but not on my colleague
computer. Anybody know what's wrong with the above code.:confused:

Thanks in advanc

--
Infinit
-----------------------------------------------------------------------
Infinity's Profile: http://www.excelforum.com/member.php...fo&userid=3272
View this thread: http://www.excelforum.com/showthread.php?threadid=52746


Norman Jones

Save as Macro working for one computer but not the other?
 
Hi Infinity,

What error message is received on the problematic computer?


---
Regards,
Norman



"Infinity" wrote in
message ...

I have the following macro.

ACTIVEWORKBOOK.SAVEAS \"K:\COMM\INVEST\DAILY NBV NEW CALCULATIONS\\" &
\"JAMES-DV\" & RIGHT(DATE, 2) & MID(DATE, 4, 2) & LEFT(DATE, 2)

This macro is working fine on my computer but not on my colleagues
computer. Anybody know what's wrong with the above code.:confused:

Thanks in advance


--
Infinity
------------------------------------------------------------------------
Infinity's Profile:
http://www.excelforum.com/member.php...o&userid=32725
View this thread: http://www.excelforum.com/showthread...hreadid=527462




John James[_2_]

Save as Macro working for one computer but not the other?
 

Is the K drive path valid on the problem computer? Intentional tha
there isn't an extension such as .xls? Tried it without the hyphen?
Tried it without the date values?

i.e. Try simplifying the problem by testing with simpler path an
filenames. If you can get it working with a simpler example on th
problem computer, then you can progressively make it more complex unti
you identify the part that makes it fall over, and then post tha
problem if it doesn't make sense

--
John Jame
-----------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...fo&userid=3269
View this thread: http://www.excelforum.com/showthread.php?threadid=52746


Infinity[_4_]

Save as Macro working for one computer but not the other?
 

This is the error i received :

RUN-TIME ERROR ‘1004’

THE FILE COULD NOT BE ACCESSED. TRY ONE OF THE FOLLOWING:

MAKE SURE THE SPECIFIED FOLDER EXISTS.
MAKE SURE THE FOLDER THAT CONTAINS THE FILE IS NOT READ-ONLY.
MAKE SURE THE FILE NAME DOES NOT CONTAIN ANY OF THE FOLLOWING
CHARACTERS: < ? [ ] : | OR *
MAKE SURE THE FILE/PATH NAME DOESN’T CONTAIN MORE THAN 218

I also made an attachment of the error message in a doc file.


+-------------------------------------------------------------------+
|Filename: error.doc |
|Download: http://www.excelforum.com/attachment.php?postid=4539 |
+-------------------------------------------------------------------+

--
Infinity
------------------------------------------------------------------------
Infinity's Profile: http://www.excelforum.com/member.php...o&userid=32725
View this thread: http://www.excelforum.com/showthread...hreadid=527462


Infinity[_5_]

Save as Macro working for one computer but not the other?
 

oh... and i just identified where the error came from. It is this
problem

& RIGHT(DATE, 2) & MID(DATE, 4, 2) & LEFT(DATE, 2)

If i remove this then i can save but i need the dates as the file is
maintain of a daily basis and as figures changes. And asking people to
maintain file name is a big problem a they have their own naming
methods. I dont want this problem to happen.

Thanks again.


--
Infinity
------------------------------------------------------------------------
Infinity's Profile: http://www.excelforum.com/member.php...o&userid=32725
View this thread: http://www.excelforum.com/showthread...hreadid=527462


Norman Jones

Save as Macro working for one computer but not the other?
 
Hi Infinity,

With the workbook in question active, run the problematic code
When the code errors, go to the VBE and select the project in the Project
Explorer Window

Hit the reset button and look at the Tools | References list

Look for any references marked as "MISSING".

Either uncheck the reference or, if the reference is needed, try the browse
button to locate the library,


---
Regards,
Norman




"Infinity" wrote in
message ...

oh... and i just identified where the error came from. It is this
problem

& RIGHT(DATE, 2) & MID(DATE, 4, 2) & LEFT(DATE, 2)

If i remove this then i can save but i need the dates as the file is
maintain of a daily basis and as figures changes. And asking people to
maintain file name is a big problem a they have their own naming
methods. I dont want this problem to happen.

Thanks again.


--
Infinity
------------------------------------------------------------------------
Infinity's Profile:
http://www.excelforum.com/member.php...o&userid=32725
View this thread: http://www.excelforum.com/showthread...hreadid=527462




Infinity[_6_]

Save as Macro working for one computer but not the other?
 

:) Just solve the problem.



Thanks Norman Jones :)


--
Infinity
------------------------------------------------------------------------
Infinity's Profile: http://www.excelforum.com/member.php...o&userid=32725
View this thread: http://www.excelforum.com/showthread...hreadid=527462



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

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