Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if i save as the excel file, macros path changed

hi,
i use public excel file( plan.xls). i run macro on plan.xls and save as the
file for copy-paste, change color vs. because i don't want to change public
excel files properties but i save as the file, changed public.xls macros path.

example
plan.xls have "olustur" macros but i save as plan.xls to plan-yedek.xls and
i open the plan.xls, plan.xls macros adress changed. plan-yedek!olustur.

How can i secure default settings. thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default if i save as the excel file, macros path changed

have your macro use the filecopy command to make the copy of plan.xls without
opening it excel.

--
Regards,
Tom Ogilvy


"Selim Ozbas" wrote:

hi,
i use public excel file( plan.xls). i run macro on plan.xls and save as the
file for copy-paste, change color vs. because i don't want to change public
excel files properties but i save as the file, changed public.xls macros path.

example
plan.xls have "olustur" macros but i save as plan.xls to plan-yedek.xls and
i open the plan.xls, plan.xls macros adress changed. plan-yedek!olustur.

How can i secure default settings. thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if i save as the excel file, macros path changed

hi,
thanks for answer

i tried your request to use filecopy command but filecopy command not run
because plan.xls was opened.
The user work on plan.xls and save as other filename when worik is finished.
i say please save as other filename to the user because i don't want the
user destroy the macro unknowingly


"Tom Ogilvy" wrote:

have your macro use the filecopy command to make the copy of plan.xls without
opening it excel.

--
Regards,
Tom Ogilvy


"Selim Ozbas" wrote:

hi,
i use public excel file( plan.xls). i run macro on plan.xls and save as the
file for copy-paste, change color vs. because i don't want to change public
excel files properties but i save as the file, changed public.xls macros path.

example
plan.xls have "olustur" macros but i save as plan.xls to plan-yedek.xls and
i open the plan.xls, plan.xls macros adress changed. plan-yedek!olustur.

How can i secure default settings. thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default if i save as the excel file, macros path changed

In the beforeSave event,

put up the Application.getSaveAsFilename dialog

set cancel to true (to cancel the users initiated save)

Application.EnableEvents = False
save the file use SaveCopy as and specify the selected file name
Application.EnableEvents = True

Open the copied file and close Plan.xls

--
Regards,
Tom Ogilvy


"Selim Ozbas" wrote:

hi,
thanks for answer

i tried your request to use filecopy command but filecopy command not run
because plan.xls was opened.
The user work on plan.xls and save as other filename when worik is finished.
i say please save as other filename to the user because i don't want the
user destroy the macro unknowingly


"Tom Ogilvy" wrote:

have your macro use the filecopy command to make the copy of plan.xls without
opening it excel.

--
Regards,
Tom Ogilvy


"Selim Ozbas" wrote:

hi,
i use public excel file( plan.xls). i run macro on plan.xls and save as the
file for copy-paste, change color vs. because i don't want to change public
excel files properties but i save as the file, changed public.xls macros path.

example
plan.xls have "olustur" macros but i save as plan.xls to plan-yedek.xls and
i open the plan.xls, plan.xls macros adress changed. plan-yedek!olustur.

How can i secure default settings. thanks

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
Format changed if we save our own (.xlt) file as (.csv) in Excel 2 Khayae Excel Discussion (Misc queries) 1 December 14th 07 05:15 PM
No prompt to save Excel file which has changed Neil Excel Discussion (Misc queries) 4 June 10th 07 11:17 PM
Moved file, changed path, macros don't work donbowyer Excel Programming 3 May 22nd 06 08:27 AM
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
Excel is not asking to save a changed file when the file is closed Ron Excel Discussion (Misc queries) 2 March 14th 05 01:05 AM


All times are GMT +1. The time now is 03:06 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"