PC Review


Reply
Thread Tools Rate Thread

auto deleting records form more than one sheet in a workbook.

 
 
=?Utf-8?B?U2Ft?=
Guest
Posts: n/a
 
      17th Nov 2006
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 With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      19th Nov 2006
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" <(E-Mail Removed)> wrote in message
news:B6D71661-2499-463D-AA1B-(E-Mail Removed)...
>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 With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      19th Nov 2006
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a sheet in a shared and protected workbook atledreier Microsoft Excel Programming 2 6th Nov 2007 09:00 AM
Delete subform records without deleting main form records =?Utf-8?B?QW5pdGE=?= Microsoft Access Form Coding 0 21st Nov 2006 07:00 AM
Display 10 records from same workbook but from different sheet =?Utf-8?B?Y2hlbW5rcw==?= Microsoft Excel Worksheet Functions 2 26th Feb 2006 06:58 PM
Deleting a blank sheet in a workbook wolfdogg Microsoft Excel Programming 3 16th Jul 2005 05:29 AM
Deleting every sheet in workbook after Worksheets(4) Todd Huttenstine Microsoft Excel Programming 2 2nd Jan 2004 06:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:54 PM.