Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create command button with VBA
Hi All, i have a report that i delete the old sheet and replace it with a new
one. What i would like to do is create a command button with VBA and place it on the new sheet (ALL LC PARTS) and it must have a comment "BACK" on it the code for this button would also have to go into the new sheet module. Any help on this would be much appreciated. -- Les |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create command button with VBA
Sub test()
Sheets("ALL LC PARTS").Delete Sheets.Add after:=Sheets(Sheets.Count) ActiveSheet.Name = "ALL LC PARTS" Set newbutton = ActiveSheet.OLEObjects.Add( _ ClassType:="Forms.CommandButton.1", _ Link:=False, _ DisplayAsIcon:=False, _ Left:=227.25, _ Top:=219, _ Width:=72, _ Height:=24) newbutton.Object.Caption = "Back" End Sub "Les" wrote: Hi All, i have a report that i delete the old sheet and replace it with a new one. What i would like to do is create a command button with VBA and place it on the new sheet (ALL LC PARTS) and it must have a comment "BACK" on it the code for this button would also have to go into the new sheet module. Any help on this would be much appreciated. -- Les |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create attachment command button | Excel Discussion (Misc queries) | |||
Wanting to Create A Command Button Command | Excel Programming | |||
Create a command button in Excel using C# | Excel Programming | |||
How to Create a Command Button | Excel Discussion (Misc queries) | |||
Create Command Button from Code | Excel Programming |