Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting Rows form Protected Sheet | Excel Discussion (Misc queries) | |||
Auto Deleting of a Sheet? | Excel Programming | |||
Display 10 records from same workbook but from different sheet | Excel Worksheet Functions | |||
Deleting a blank sheet in a workbook | Excel Programming | |||
Modeless form disappears on deleting sheet | Excel Programming |