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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a variable by findfieldbytext a second time?

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. I tried VBScript forums but no response yet so I thought it wouldn't hurt to reach out here as I have been helped so many times here.

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

Dim Fieldelement

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.

Dim Fieldelement1
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!
 

Hi,

What VBApplication?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip,

I'm working with PCOMM, which is more appropriately vbscript I believe but I was hoping it would be relatable enough.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top