PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Charting Changing textbox properties from Access VBA

Reply

Changing textbox properties from Access VBA

 
Thread Tools Rate Thread
Old 11-03-2008, 02:22 AM   #1
justme0010
Guest
 
Posts: n/a
Default Changing textbox properties from Access VBA



I have code in an Access VBA module that creates a workbook in Excel. I
am trying to create and manipulate an Excel textbox. I am able to
create the textbox, and place text in it, but how can I change the
background color? This doesnt work:

With .ActiveSheet.Shapes("Text Box 2")
..ShapeRange.Fill.ForeColor.SchemeColor = 39
End With

This also does does not work:
..ActiveSheet.Shapes("Text Box 2").Select
objExcel.Selection.ShapeRange.Fill.ForeColor.SchemeColor = 20

However, this *does* work:
With .ActiveSheet.Shapes("Text Box 2").TextFrame
..Characters.Text = "My Text"
End With

note: objExcel is an Excel.Application object
by the way, for no apparent reason in this post, there is incorrectly a
space showing up in "SchemeColor", but thats not my code




--
justme0010
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off