Editing multiple controlsource references

  • Thread starter Thread starter Roger on Excel
  • Start date Start date
R

Roger on Excel

I need to edit 100's of textbox ControlSource references :

for example for textbox1 the ControlSource is Sheet1!a1 and for textbox2 the
ControlSource is Sheet1!a2 etc etc etc...

it could take me days to do this manually - there must be a quicker way?
 
Try the below for the range ..textbox1 to textbox10

Private Sub UserForm_Initialize()
Dim intCount as Integer
For intCount = 1 To 10
UserForm1.Controls("Textbox" & intCount).ControlSource = "Sheet1!A" & intCount
Next
End Sub

If this post helps click Yes
 
Back
Top