Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default auto deleting records form more than one sheet in a workbook.

I am trying to set up a program to delete a record from one sheet and the
macro goes to the other sheets with the same record and deletes them
automatickly.
I also want to bring up the file to a specific sheet when it is first opened.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default auto deleting records form more than one sheet in a workbook.

For the second, look at the workbook_open event. Activate the sheet in
that event.

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


"Sam" wrote in message
...
I am trying to set up a program to delete a record from one sheet and the
macro goes to the other sheets with the same record and deletes them
automatickly.
I also want to bring up the file to a specific sheet when it is first
opened.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default auto deleting records form more than one sheet in a workbook.

There are numerous options to for deleting or clearing data and items in VBA.
You can use the help files and search for "Delete Method" as it applies to
the Range Object and "ClearContents Method". It will give you an idea of
what your options are. Then when you are sure of what you want to do. If
you cannot write the code, re-post.

To open to a specific worksheet do the following:

1- Press Alt + F11 to open the Visual Basic Editor.
2- In the project window to the left of your screen click double click on
ThisWorkbook to open the workbook code module.
3- Copy the following code and paste it into the code module that you have
just opened.
Private Sub Workbook_Open()
Worksheets(2).Activate
End Sub
4- Change the number from 2 in parentheses to the worksheet number or name
that you want to appear when you open the file. If you use a name, put it in
quotes.
5- Save the workbook before closing it.

When you reopen the workbook, it will display the worksheet that you
specified.

"Sam" wrote:

I am trying to set up a program to delete a record from one sheet and the
macro goes to the other sheets with the same record and deletes them
automatickly.
I also want to bring up the file to a specific sheet when it is first opened.

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
Deleting Rows form Protected Sheet WildWill Excel Discussion (Misc queries) 1 June 24th 09 12:23 PM
Auto Deleting of a Sheet? Ben H Excel Programming 1 August 2nd 06 12:58 PM
Display 10 records from same workbook but from different sheet chemnks Excel Worksheet Functions 2 February 26th 06 06:58 PM
Deleting a blank sheet in a workbook wolfdogg Excel Programming 3 July 16th 05 05:29 AM
Modeless form disappears on deleting sheet Walter Martin Excel Programming 1 August 3rd 03 11:07 AM


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