Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to create a button that when you click it it will delete all data
in a workbook. Anyone have any ideas??? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub CommandButton1_Click()
Dim ws As Worksheet Dim r As Range For Each ws In Worksheets ws.Activate For Each r In ws.UsedRange MsgBox r Next r Next End Sub |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
So do I need to create a command button?
" wrote: Private Sub CommandButton1_Click() Dim ws As Worksheet Dim r As Range For Each ws In Worksheets ws.Activate For Each r In ws.UsedRange MsgBox r Next r Next End Sub |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Go to TOOLSMACROVisual Basic Editor
then Right Click on VBAProjects on the project window then Insert UserForm On the user form, insert a commandbutton copy and paste the code and then run I hope u understand what i am trying to say:) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I delete a macro when the Delete button is not active? | Excel Worksheet Functions | |||
CHANGE DATA SERIES WITH A COMMAND BUTTON | Charts and Charting in Excel | |||
Excel Macro to Copy & Paste | Excel Worksheet Functions | |||
Macro to delete data in 'green' cells only | Excel Worksheet Functions | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions |