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!

Using VB to write a GP Macro: I get macro error "keyword not found" 1

Status
Not open for further replies.

Alcar

Programmer
Sep 10, 2001
595
US
Hello, let me give you the outputs of a recorded macro from GP and the one I created via VB:

Recorded by GP
Code:
# DEXVERSION=DEX 8.00m086 2 2
CheckActiveWin dictionary 'default'  form 'UPR_Employee_MNT_Deduction' window 'UPR_Employee_MNT_Deduction' 
  TypeTo field 'Employee ID' , 'M3820'
  MoveTo field Deduction 
  TypeTo field Deduction , 'ME401K'
  MoveTo field 'Deduction Year Max'
  TypeTo field 'Deduction Year Max' , '2050000'
  MoveTo field 'Save Button' 
  ClickHit field 'Save Button' 
# Human Resources is registered. You may want to save changes in Human Resources first or run the Update Benefit Definition reconcile. Do you want to continue?
NewActiveWin dictionary 'default'  form DiaLog window DiaLog 
  ClickHit field OK 
NewActiveWin dictionary 'default'  form 'UPR_Employee_MNT_Deduction' window 'UPR_Employee_MNT_Deduction' 
  MoveTo field 'Clear Button' 
  ClickHit field 'Clear Button'

the macro created with VB
Code:
# DEXVERSION=DEX 8.00m086 2 2
CheckActiveWin dictionary 'default'  form 'UPR_Employee_MNT_Deduction' window 'UPR_Employee_MNT_Deduction' 
  TypeTo Field 'Employee ID' , 'M3610'
  MoveTo field Deduction 
  TypeTo field Deduction , 'OP401K'
  MoveTo Field 'Deduction Year Max'
  TypeTo Field 'Deduction Year Max' , '2050000'
  MoveTo Field 'Save Button'
  ClickHit Field 'Save Button'
# Human Resources is registered. You may want to save changes in Human Resources first or run the Update Benefit Definition reconcile. Do you want to continue?
NewActiveWin Dictionary 'default'  form DiaLog window DiaLog
  ClickHit field OK
NewActiveWin Dictionary 'default'  form 'UPR_Employee_MNT_Deduction' window 'UPR_Employee_MNT_Deduction'
  MoveTo Field 'Clear Button'
  ClickHit Field 'Clear Button'

my problem is that no matter how identical the two macros are, the first one runs smoothly, the second one gives me this error:

Keyword or punctuation expected, but not found. (Line#3)

I need to create this macro via VB because I have over 1200 employees I need to adjust this deduction for.
Any ideas what special characters I am missing? is there anywhere where I can look this up?

ps. See ya at Convergence 2007!!

Daren J. Lahey
Programmer Analyst
FAQ183-874 contains Suggestions for Getting Quick and Appropriate Answers to your questions.
 
In the second series of code you use the word 'Field' with an upper case 'F' whilst the original code uses the word 'field' with a lower case 'f'.

You use 'Field' sixth instance, where the original code has 'field'.

------
Robert
 
Yup... sometimes I dislike case-sensitive errors...

Thanks Robert

Daren J. Lahey
Programmer Analyst
FAQ183-874 contains Suggestions for Getting Quick and Appropriate Answers to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top