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

I have a couple thousand rows of data that I need to sort
by supervisor. However, it is payroll info, so I have to
sort, copy, and paste each supervisors info into a new
workbook without showing them the other info, each book
will then be e-mailed to the respective supervisors.

I can writew a macro to do everything except change the
save name. I tried copying and pasting into the save as
box, but it continues to save it under the original name I
used when writing the macro. Is there anything I can do?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to change saved name

superName should hold the name of the supervisor.

sName = "C:\Folder1\" & superName & ".xls"
activeworkbook.SaveAs Filename:=sName
activeworkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"roger" wrote in message
...
I have a couple thousand rows of data that I need to sort
by supervisor. However, it is payroll info, so I have to
sort, copy, and paste each supervisors info into a new
workbook without showing them the other info, each book
will then be e-mailed to the respective supervisors.

I can writew a macro to do everything except change the
save name. I tried copying and pasting into the save as
box, but it continues to save it under the original name I
used when writing the macro. Is there anything I can do?

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
Macro buttons opening saved macro Wasabijim Excel Discussion (Misc queries) 0 April 29th 09 08:39 PM
Hyperlinks change when file is saved Grey Geek Excel Worksheet Functions 7 June 10th 08 05:05 PM
how to change # or copies to print in a saved sheet? John Excel Discussion (Misc queries) 0 August 21st 06 05:01 PM
undo a saved change gl kruger Excel Discussion (Misc queries) 2 April 11th 06 10:43 PM
How to have:= NOW () date/time change only if updated and saved Bob Provis Excel Worksheet Functions 2 August 7th 05 10:47 AM


All times are GMT +1. The time now is 10:52 PM.

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

About Us

"It's about Microsoft Excel"