Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default saving worksheet automatically

I am using the following function to save changes after any data is entered
into a worksheet:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveWorkbook.Save
End Sub

Is there a way to use auto save only if data is entered in a certain range?

Thanks for the help,
Mike

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default saving worksheet automatically

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

dim myRng as range
set myrng = me.range("a1,c3,e5:j17")

if myrng.cells.count = application.counta(myrng) then
me.parent.save
end if

End Sub



MIke wrote:

I am using the following function to save changes after any data is entered
into a worksheet:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveWorkbook.Save
End Sub

Is there a way to use auto save only if data is entered in a certain range?

Thanks for the help,
Mike


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default saving worksheet automatically

Dave,

I am getting a Compile error that reads Method or data member not found. I
changed the range to ("B7:S38"). I am not sure what the problem is.
Thanks for the help,
Mike

"Dave Peterson" wrote:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

dim myRng as range
set myrng = me.range("a1,c3,e5:j17")

if myrng.cells.count = application.counta(myrng) then
me.parent.save
end if

End Sub



MIke wrote:

I am using the following function to save changes after any data is entered
into a worksheet:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveWorkbook.Save
End Sub

Is there a way to use auto save only if data is entered in a certain range?

Thanks for the help,
Mike


--

Dave Peterson

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
Automatically saving changes Jens Palacios Neffke[_2_] Excel Discussion (Misc queries) 3 April 17th 07 08:00 AM
Automatically saving changes Jens Palacios Neffke Excel Discussion (Misc queries) 1 April 17th 07 07:52 AM
Automatically saving value even though the formula changes with th jpolzner Excel Worksheet Functions 1 April 14th 07 06:10 PM
Excel: Automatically Saving as Web Page Danimagus Excel Discussion (Misc queries) 0 May 31st 05 07:32 PM
FILES CREATED AUTOMATICALLY WHILE SAVING Venoy Varghese P Excel Discussion (Misc queries) 0 March 30th 05 04:01 PM


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