Greetings,
I made up an Excel VBA module to automatically create fairly complex charts with several textboxes. I've since learned that I can invoke Excel inside Access and create the charts. This is going VERY well, and the charts look great. However, when I want to start adding some textboxes, I get an error message "Variable not defined". For some reason, it doesn't like "msoTextOrientationHorizontal". I have the Microsoft Excel 14.0 Object Library referenced.
Below is a distillation of my code:
Code:
Dim x1 As Excel.Application
Set x1 = New Excel.Application
'Lots of code here creating the chart object.
x1.ActiveChart.Shapes.AddTextbox(msoTextOrientationHorizontal, 100, 100, 200, 50).Select
x1.Selection.Characters.Text = "State Well" & vbNewLine & "Number"
Any ideas? Thanks in advance for what light folks can shed on this!
Jonathan Mulder
Engineering Geologist
California Department of Water Resources