Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default How to ask VB for the last cell modified???

My macro:
sub minusculas()
"LAST CELL MODIFIED"=ucase("LAST CELL MODIFIED")
end sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to ask VB for the last cell modified???

What do you mean by "last modified"? Do you mean most recently,
or the last row and column modified?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"filo666" wrote in message
...
My macro:
sub minusculas()
"LAST CELL MODIFIED"=ucase("LAST CELL MODIFIED")
end sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default How to ask VB for the last cell modified???

I am assuming that you do not mean last row or column but rather the last
cell that was changed. Is this going to be sheet specific or is this in the
workbook in general. If is is sheet specific then you need to declare a sheet
level variable and update it based on the sheet on change event for the
sheet. If you mean for the book in general then you probably want to access
the thisworkbook on change event and store both the sheet and the cell.

Sheet Specific...
Private LastCellChanged As Range

Private Sub Worksheet_Change(ByVal Target As Range)
Set LastCellChanged = Target
End Sub

Global...
Public g_LastCellChanged As Range
Public g_LastSheetChanged As Range

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Set g_LastSheetChanged = Sh
Set g_LastCellChanged = Target
End Sub


--
HTH...

Jim Thomlinson


"filo666" wrote:

My macro:
sub minusculas()
"LAST CELL MODIFIED"=ucase("LAST CELL MODIFIED")
end sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default How to ask VB for the last cell modified???

last cell changed.............
Tks tim, I'll try with your suggestion
TKS both of you

"Jim Thomlinson" wrote:

I am assuming that you do not mean last row or column but rather the last
cell that was changed. Is this going to be sheet specific or is this in the
workbook in general. If is is sheet specific then you need to declare a sheet
level variable and update it based on the sheet on change event for the
sheet. If you mean for the book in general then you probably want to access
the thisworkbook on change event and store both the sheet and the cell.

Sheet Specific...
Private LastCellChanged As Range

Private Sub Worksheet_Change(ByVal Target As Range)
Set LastCellChanged = Target
End Sub

Global...
Public g_LastCellChanged As Range
Public g_LastSheetChanged As Range

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Set g_LastSheetChanged = Sh
Set g_LastCellChanged = Target
End Sub


--
HTH...

Jim Thomlinson


"filo666" wrote:

My macro:
sub minusculas()
"LAST CELL MODIFIED"=ucase("LAST CELL MODIFIED")
end sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default How to ask VB for the last cell modified???

Hey, could some of you chek 11 discution below, the one "3 unanswered
questions, 1......"
I really need help with these questions
Tanks

"Jim Thomlinson" wrote:

I am assuming that you do not mean last row or column but rather the last
cell that was changed. Is this going to be sheet specific or is this in the
workbook in general. If is is sheet specific then you need to declare a sheet
level variable and update it based on the sheet on change event for the
sheet. If you mean for the book in general then you probably want to access
the thisworkbook on change event and store both the sheet and the cell.

Sheet Specific...
Private LastCellChanged As Range

Private Sub Worksheet_Change(ByVal Target As Range)
Set LastCellChanged = Target
End Sub

Global...
Public g_LastCellChanged As Range
Public g_LastSheetChanged As Range

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Set g_LastSheetChanged = Sh
Set g_LastCellChanged = Target
End Sub


--
HTH...

Jim Thomlinson


"filo666" wrote:

My macro:
sub minusculas()
"LAST CELL MODIFIED"=ucase("LAST CELL MODIFIED")
end sub

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
cell that updated when spreadsheet is modified jcheko Excel Discussion (Misc queries) 0 April 9th 10 01:11 AM
Display a Date when a cell is Modified Sean Excel Worksheet Functions 2 July 15th 08 09:16 PM
Show date cell modified manxman Excel Worksheet Functions 3 March 22nd 06 11:48 PM
In adjacent cell, show last date modified of target cell. manxman Excel Discussion (Misc queries) 0 March 17th 06 10:47 PM
How do I capture the Modified date in a cell? rcg[_2_] Excel Programming 2 March 9th 05 05:24 PM


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