Very new to VBA, usually use Matlab and Python. I've got the following section of code
Sub Example
Dim num As Integer
num = 62
ActiveSheet.CheckBoxes.Add(23.25, 595.5, 101.25, 18.75).Select
With Selection
.Name = "NewCheckBox"
Sheets("IPT data").Select
.Caption = Cells(num, "C")
End With
Sheets("IPT Chart").Select
ActiveSheet.CheckBoxes("NewCheckBox").Select
With Selection
.Value = xlOff
.LinkedCell = "'IPT data'!$A$num"
.Display3DShading = False
End With
End Sub
I want the linked cell to refer to Anum. Is there any way to do this? Later num will be used in a loop so I can't just use it standalone.
Like I say, very new and this is probably basic stuff, so I apoligse. I had a search around and have tried to use both Cells and Range to no avail.
Thanks