Adding new worksheet using VBA

W

wuming

Hi,
How do u add a new worksheet to an existing workbook when lets say
command button is clicked? The worksheet would then asked user to inpu
data. Anyone knows
 
N

Nick Hodge

Wuming

This code in the Click event of a command button

Private Sub CommandButton1_Click()
Worksheets.Add
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
Top