invalid sheet identifier error

I

Irshad Ahmed

Set pagsObj = docObj.Pages
Set pagObj = pagsObj.Item(1)
Set shpsObj = pagObj.Shapes
Set shpObj = shpsObj.Item(1)

The above code is part of the VB probram I am writing. The
line aboce, "Set shpObj = shpsObj.Item(1)" give's error
invalid sheet identifier.

My declerastions are as follows

Dim g_Sink As EventSink ' Instance of class
EventSink
Dim g_Event As Object ' Event object
Dim evntObj As Object
Dim docsObj As Object
Dim docObj As Object
Dim visStn As Object
Dim pagsObj As Object
Dim pagObj As Object
Dim shpsObj As Object
Dim shpObj As Object
Dim inCount1 As Integer
Dim celObjHeight As Object
Dim celObjWidth As Object

Any suggestion on correcting my program would be much
appriciated.
Irshad
 
D

David Parker

Does you docObj have a value?
Does your page have any shapes on it? - Is shpsObj.Count > 0 ?
 
I

Irshad

With your input below and some trial and error via Debug
Prining results. I now have it Thanks Much David.
Irshad
 

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