Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default save on leaving a cell

I would like to save the workbook when the user moves out of cell D7 (o
after updating cell D7)

same as pressing ctrl+s on the keyboard.

but to do this in vba - any idea

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default save on leaving a cell

Mike,

After updating D7

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$D$7" Then
ThisWorkbook.Save
End If

End Sub

in the sheet code module.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"mikewild2000" wrote in message
...
I would like to save the workbook when the user moves out of cell D7 (or
after updating cell D7)

same as pressing ctrl+s on the keyboard.

but to do this in vba - any ideas


---
Message posted from http://www.ExcelForum.com/




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default save on leaving a cell

Thank you Bob - works a Dream.

However, took me a while to file the Sheet code modual.

I was inserting a modual via the insert menu.

What i did was highlight "sheet1" in Excel objects than under the vie
menu, click code then copied your code in.

Learning all the tim

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default save on leaving a cell

Mike,

That's good. I bet that finding it out for yourself will be more valuable
for you in the future that it would have been if I had told you all that in
detail (although it was not a deliberate ploy on my part<vbg). There are
other ways to do it (via the VB IDE) but you found what I think is the best
way.

Good luck with it all.

Regards

Bob

"mikewild2000" wrote in message
...
Thank you Bob - works a Dream.

However, took me a while to file the Sheet code modual.

I was inserting a modual via the insert menu.

What i did was highlight "sheet1" in Excel objects than under the view
menu, click code then copied your code in.

Learning all the time


---
Message posted from http://www.ExcelForum.com/



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
Leaving Cell Blank Ron A.[_2_] Excel Worksheet Functions 2 October 6th 09 05:36 PM
Force required entry in cell before leaving that cell Retired Bill Excel Worksheet Functions 8 March 17th 09 10:57 PM
Leaving Cell Blank. GEM Excel Worksheet Functions 3 January 20th 09 12:09 PM
Leaving a cell blank Skip cell with dates New Users to Excel 5 August 24th 08 11:18 PM
Leaving a cell blank. Not NA(), not "". Incoherent Excel Worksheet Functions 4 September 30th 05 05:36 PM


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