What references do I need to program a Textbox and an Image?

J

Jose Manuel

Hi! I recently update to Excel 2007. I have some macros that I need to run,
but they do not work because I cannot find the references I need! I need to
do some things with an image and some textboxes, but the macro doesn't work!

I have selected the following:

- VBA for applications
- MS Excel 12 Object Library
- MS Graph 12 Object Library
- OLE Automation
- MS Office 12 Object Library
- MS Office Control 1.0 Type Library

What referencies do I need!?

Thanks a lot!

Manuel H.
 
C

Chip Pearson

What reference your code may need depending entirely on what calls the
makes to what libraries. You have all the core libraries already. Post
a section of code that fails.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
J

Jose Manuel

Hi Chip P.

The code I have is very simple. The main problem is that I need to rewrite
it: I need to insert a textbox in Excel. Then I need to move the text of cell
A4 to the textbox.

The problem is that when I record the macro, it doesn't record anything
about the textbox. I inserted a textbox, I changed the text in it, I changed
its position... but it only recorded:

Sub Macro1()
'Macro1 Macro

Range("A4").Select
End Sub

I don't know what to do! The macro I have is for Word and it works fine, but
in Excel I just don't know how to do the same:

Sub Macro1()

' Macro1 Macro

ActiveDocument.Shapes("Text Box 2").Select
ActiveDocument.AttachedTemplate.BuildingBlockEntries( _
" Simple textbox").Insert Where:=Selection.Range, RichText:=True
Selection.TypeText Text:="My example"

End Sub

Thanks a lot
 

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