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

I have a question about saving Excel changes
I have a macro that when activated by an operator copies data from worksheet A to worksheet D
How can I automatically save the copied data in Worksheet D in case the operator hits the x o
closes workbook without saving changes

thank

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default SavingExcelChanges

Hi Mike

You'll need to add this line of code after the pasting has been done

----------------------
Thisworkbook.Sav
----------------------

This will save the whole workbook automatically. Note that if a series of pasting is done, it may be annoying to the user for having to wait for the file to save each time, so you may want to put this code within the BeforeClose event so that it only saves once

SuperJas.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default SavingExcelChanges

Hi Super Jas
Thanks for the help. This works very well.
Mike

----- SuperJas wrote: -----

Hi Mike,

You'll need to add this line of code after the pasting has been done:

-----------------------
Thisworkbook.Save
-----------------------

This will save the whole workbook automatically. Note that if a series of pasting is done, it may be annoying to the user for having to wait for the file to save each time, so you may want to put this code within the BeforeClose event so that it only saves once.

SuperJas.
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



All times are GMT +1. The time now is 10:36 AM.

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"