ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding new worksheet using VBA (https://www.excelbanter.com/excel-programming/303508-adding-new-worksheet-using-vba.html)

wuming[_8_]

Adding new worksheet using VBA
 
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

--
Message posted from http://www.ExcelForum.com


Nick Hodge

Adding new worksheet using VBA
 
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
HIS


"wuming " wrote in message
...
Hi,
How do u add a new worksheet to an existing workbook when lets say a
command button is clicked? The worksheet would then asked user to input
data. Anyone knows?


---
Message posted from
http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com