Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
om om is offline
external usenet poster
 
Posts: 18
Default Save on sheet shift

Hi there

I am new to this VBA, but i will try to give it a go.

I would like the workbook to be saved when the user shifts away from Sheet1
to be certain that content of Sheet1 is always saved.

I suppose that the piece of code should be placed in a VBA module under the
workbook

Thanks Ole

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Save on sheet shift

Try this:

Private Sub Worksheet_Deactivate()
ActiveWorkbook.Save
End Sub

Right click sheet1 sheet tab, view code and paste this in

Mike

"OM" wrote:

Hi there

I am new to this VBA, but i will try to give it a go.

I would like the workbook to be saved when the user shifts away from Sheet1
to be certain that content of Sheet1 is always saved.

I suppose that the piece of code should be placed in a VBA module under the
workbook

Thanks Ole

  #3   Report Post  
Posted to microsoft.public.excel.programming
om om is offline
external usenet poster
 
Posts: 18
Default Save on sheet shift

Hi Mike

Works fine, thanks a lot

"Mike H" skrev:

Try this:

Private Sub Worksheet_Deactivate()
ActiveWorkbook.Save
End Sub

Right click sheet1 sheet tab, view code and paste this in

Mike

"OM" wrote:

Hi there

I am new to this VBA, but i will try to give it a go.

I would like the workbook to be saved when the user shifts away from Sheet1
to be certain that content of Sheet1 is always saved.

I suppose that the piece of code should be placed in a VBA module under the
workbook

Thanks Ole

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
cannot shift objects off sheet abubakr kamal Excel Discussion (Misc queries) 1 May 4th 09 05:29 PM
CAN'T SHIFT OBJECTS OFF SHEET. WHAT DOES THIS MEAN? PRINCE Excel Discussion (Misc queries) 2 February 9th 09 09:08 AM
Cannot shift objects off sheet kurlisue Excel Discussion (Misc queries) 7 August 19th 08 10:38 AM
Cannot Shift Object off Sheet Steve Jones Excel Discussion (Misc queries) 1 May 29th 06 12:37 PM
Cannot Shift Objects off sheet Norman Jones Excel Worksheet Functions 0 January 26th 06 12:45 AM


All times are GMT +1. The time now is 03:25 AM.

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"