Hi,
Im trying to create a button through VBA code and following that I will assign a macro to save the file in a specific folder
'Creating a button to save workbook
ActiveCell.Offset(2, 0).Select
Dim newButton As OLEObject
With ActiveCell
Set newButton = ActiveSheet.OLEObjects.Add
ClassType = "Forms.CommandButton.1",_
Link:=False, DisplayAsIcon:=False, _
Left:=.Left, _
Top:=.Top, _
Height:=.Height, _
Width:=.Width)
newButton.Object.Caption = .Row
newButton.Object.Font.Size = 6
newButton.Object.Font.Bold = True
newButton.Object.WordWrap = True
newButton.Name = "Save File" & .Row
newButton.Object.Font.Name = "MS Gothic"
End With
Regards,
Dean
Im trying to create a button through VBA code and following that I will assign a macro to save the file in a specific folder
'Creating a button to save workbook
ActiveCell.Offset(2, 0).Select
Dim newButton As OLEObject
With ActiveCell
Set newButton = ActiveSheet.OLEObjects.Add
ClassType = "Forms.CommandButton.1",_
Link:=False, DisplayAsIcon:=False, _
Left:=.Left, _
Top:=.Top, _
Height:=.Height, _
Width:=.Width)
newButton.Object.Caption = .Row
newButton.Object.Font.Size = 6
newButton.Object.Font.Bold = True
newButton.Object.WordWrap = True
newButton.Name = "Save File" & .Row
newButton.Object.Font.Name = "MS Gothic"
End With
Regards,
Dean