Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I have created a check box to delete certain sheet (which is called by ref) ) in my mainsheet called "Home". So that when user check the box, it will delete the selected sheet. This is what I've done so far... Can some one correct me..??? Const MainSheet = "Home" /----------------------------------------------------------------------------- --------------------------------------/ Sub InitializeValues() With Worksheets(MainSheet) 'check for all user inputs ClearResultsSheet_checked = .ClearResultsSheetCheckBox1.Value End With End Sub /----------------------------------------------------------------------------- ------------------------------------/ Sub ClearSheet(ByRef spectype As String) 'just to clear the old Results Sheet before putting any new data in Dim strname As String strname = spectype & " Results" Worksheets(strname).Activate 'Worksheets(SheetName).Activate Cells.Select Selection.Delete Range("A").Select End Sub /----------------------------------------------------------------------------- --------------------------------/ -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200606/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello cyzax7, Try this... Sub ClearSheet(ByRef spectype As String) 'just to clear the old Results Sheet before putting any new data in Dim strname As String strname = spectype & " Results" With Worksheets(strname) UsedRange.ClearContents Range("A").Select End With End Sub Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=551257 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete selected range | Excel Programming | |||
how do i make it so that when a sheat is selected either via link or tab, that xlLastCell is selected. the last on the sheet. | Excel Worksheet Functions | |||
delete every nth row in selected range | Excel Discussion (Misc queries) | |||
Delete non-selected rows | Excel Programming | |||
Delete Selected Rows | Excel Programming |