J
junx13
Hi Dave,
Thanks for all the help.( Same to you, ste mac
)
What I would like is to write code that, like the buttons code :
Sub testme()
Dim myRng As Range
Dim myCell As Range
Dim wks As Worksheet
Dim myBTN As Button
Set wks = ActiveSheet
With wks
.Buttons.Delete 'remove existing buttons???
Set myRng = .Range("a1:a10")
For Each myCell In myRng.Cells
With myCell
Set myBTN = .Parent.Buttons.Add(0, 0, 0, 0)
myBTN.Name = "BTN_" & .Address(0, 0)
myBTN.OnAction = ThisWorkbook.Name & "!myBTNmacro"
myBTN.Caption = "Click Me"
End With
Next myCell
End With
End Sub
Except that I would like the button to look like an image file. I
there a property like myBtn.Image or something like that? Or do I hav
to add an image that is clickable? If so, how do I do it
Thanks for all the help.( Same to you, ste mac
What I would like is to write code that, like the buttons code :
Sub testme()
Dim myRng As Range
Dim myCell As Range
Dim wks As Worksheet
Dim myBTN As Button
Set wks = ActiveSheet
With wks
.Buttons.Delete 'remove existing buttons???
Set myRng = .Range("a1:a10")
For Each myCell In myRng.Cells
With myCell
Set myBTN = .Parent.Buttons.Add(0, 0, 0, 0)
myBTN.Name = "BTN_" & .Address(0, 0)
myBTN.OnAction = ThisWorkbook.Name & "!myBTNmacro"
myBTN.Caption = "Click Me"
End With
Next myCell
End With
End Sub
Except that I would like the button to look like an image file. I
there a property like myBtn.Image or something like that? Or do I hav
to add an image that is clickable? If so, how do I do it