Moving Text Boxes

P

phil perry

I received the following suggestion to move text boxes

Sub moveit()
With Workbooks("Book1.xls").Worksheets("Sheet1")
.TextBox1.Top=Sheet1.Range("B2").Top
.TextBox1.Left=Sheet1.Range("B2").Left
End With
End Sub

I get a message straight away highlighting the first
line (..With Workbooks etc) saying reference is out
of range.

Any suggestions?
Thanks
 
T

Tom Ogilvy

Do you have a workbook named "Book1.xls" (not named Book1 - a default
workbook does not have an extension). And that workbook has a worksheet
with a tab name of "Sheet1"


Not having one of those is usually the cause of this message.

Regards,
Tom Ogilvy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top