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

Extra 9.2 Visual Basic 2010 Putstring problem

Status
Not open for further replies.

mramda

Programmer
Apr 22, 2013
1
CA
Hi, I am writing text to a screen using PUTSTRING, the problem is if I execute the code from a button click it work fine every time by clicking button. If I execute the same code in a sub routine, it truncate the last 4 fields and the host generate an error. I need this code to work in a sub, this is an automated process with no user interaction. I have spent the last week pulling my hair out on this issue and cannot understand why it works when I click the button but not in the code. See code below.

scr.PutString(SPName, 20, 10)
scr.PutString(SPAddress, 21, 15)
scr.PutString(SPCity, 22, 15)
scr.PutString(SPProvince, 22, 48)
scr.PutString(SPPostalCode, 22, 70)

I have stepped thru in debug and it writes the text correctly to the screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top