Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting FieldElement twice

Status
Not open for further replies.

KM8888

Programmer
Nov 21, 2011
69
US
Hi all, this might be a very newbie question but I appreciate any insight.

Basically I have a spot here where I am setting a spot by text

set FieldElement = autECLSession.autECLPS.autECLFieldList.FindFieldByText (Array(0))

autECLSession.autECLPS.SetCursorPos FieldElement.startrow, FieldElement.startcol

This works fine and I am able to do what I intend with this but later down the code I attempt to set it again, I have even tried a new variable with Fieldelement1 with no luck.

set FieldElement1 = autECLSession.autECLPS.autECLFieldList.FindFieldByText (Array(1))

autECLSession.autECLPS.SetCursorPos FieldElement1.startrow, FieldElement1.startcol


The text exists and everything but everytime I get the following error "Object variable not set"

Is there something I can do to make this work? Sorry for the newb question. Again any insight is always appreciated!
 
Which line gets the error?

You would have to show more code, otherwise it's guesswork. maybe autECLSession is out of scope, or you have a "Set autECLSession = Nothing" somewhere?

 
Hey, it seems to be working now, like I said probably something I should have known to do anyway, before the second occurrence I needed

this:

autECLSession.autECLPS.autECLFieldList.Refresh

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top