Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update when worksheet close/delete

Hi,

I have a date sturcture hold information about worksheet. I need to update
this data structure when somebody close/delete worksheet.

Thanks,

Samir.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Update when worksheet close/delete

Not sure I understand - what is the Date Structure? Do you mean close the
workbook or delete a worksheet or deactivate the worksheet, delete the
worksheet?

--

Regards,
Nigel




"Samir Idrees" <Samir
wrote in message
...
Hi,

I have a date sturcture hold information about worksheet. I need to update
this data structure when somebody close/delete worksheet.

Thanks,

Samir.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update when worksheet close/delete

Hi,

Actually I have different worksheet and I store each worksheet object in a
list to find out which one is active e.g type A or type B. I need to update
this list when worksheet is delete and remove the worksheet object from the
list. Actually I need worksheet delete event with worksheet name etc. In that
way I can search my worksheet object list and delete the deleted worksheet
object.

Thanks,

Samir.

"Nigel" wrote:

Not sure I understand - what is the Date Structure? Do you mean close the
workbook or delete a worksheet or deactivate the worksheet, delete the
worksheet?

--

Regards,
Nigel




"Samir Idrees" <Samir
wrote in message
...
Hi,

I have a date sturcture hold information about worksheet. I need to update
this data structure when somebody close/delete worksheet.

Thanks,

Samir.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Update when worksheet close/delete

The workbook sheet activate event is fired when a worksheet is deleted. You
could use that event to scan the workbook sheets and refresh your list.

For example only (put into the workbook codesheet)

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim mySh As Worksheet, myMessage As String

For Each mySh In Sheets

myMessage = myMessage & mySh.Name

If mySh.Name = ActiveSheet.Name Then
myMessage = myMessage & " - Active"
End If

myMessage = myMessage & vbCrLf

Next

MsgBox myMessage

End Sub


--

Regards,
Nigel




"Samir Idrees" wrote in message
...
Hi,

Actually I have different worksheet and I store each worksheet object in
a
list to find out which one is active e.g type A or type B. I need to
update
this list when worksheet is delete and remove the worksheet object from
the
list. Actually I need worksheet delete event with worksheet name etc. In
that
way I can search my worksheet object list and delete the deleted worksheet
object.

Thanks,

Samir.

"Nigel" wrote:

Not sure I understand - what is the Date Structure? Do you mean close
the
workbook or delete a worksheet or deactivate the worksheet, delete the
worksheet?

--

Regards,
Nigel




"Samir Idrees" <Samir
wrote in message
...
Hi,

I have a date sturcture hold information about worksheet. I need to
update
this data structure when somebody close/delete worksheet.

Thanks,

Samir.



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
Open and Close a Workbook to Update Links [email protected] Excel Discussion (Misc queries) 3 July 7th 08 07:55 PM
Send Email on Update/Close marcusisfunny Excel Programming 0 January 30th 07 08:18 PM
Delete Insert Worksheet on Open/Reset on Close Jane Excel Programming 1 April 10th 06 02:08 PM
automate open/update/close Excel rosen Excel Programming 0 December 21st 04 04:59 PM
automate open/update/close Excel rosen Excel Programming 0 December 21st 04 04:07 PM


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