Intuit Financial Community: Determining T2125 # in VBA - Intuit Financial Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Determining T2125 # in VBA

#1 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 474
  • Joined: 02-November 02
  • Location:Peterborough

Posted 15 June 2010 - 02:48 AM

I am writing a VBA script in Excel that will write information from the Excel file to the T2125. I have no problem where the taxpayer and spouse only have one T2125. However, where the T1 file contains more than one T2125, how can you determine what # the current T2125 is? What I'm trying to get is the # of the T2125 that appears in the form tab.
0

#2 User is offline   Lee@Intuit Icon

  • Senior Member
  • PipPipPip
  • Group: Intuit Staff
  • Posts: 252
  • Joined: 30-November 99
  • Gender:Male
  • Location:The Big Smoke

Posted 15 June 2010 - 04:27 PM

Hey dunner,
This is well beyond my rudimentary skills. I'll see if I can find someone to try and help you...


-Lee
0

#3 User is offline   Dave@Intuit Icon

  • Senior Member
  • PipPipPip
  • Group: Intuit Staff
  • Posts: 107
  • Joined: 06-February 07
  • Gender:Male
  • Location:Mississauga

Posted 15 June 2010 - 04:40 PM

View Postdunner, on 14 June 2010 - 10:48 PM, said:

I am writing a VBA script in Excel that will write information from the Excel file to the T2125. I have no problem where the taxpayer and spouse only have one T2125. However, where the T1 file contains more than one T2125, how can you determine what # the current T2125 is? What I'm trying to get is the # of the T2125 that appears in the form tab.


Hey Dunner, you can use the ClientObject.FormCount("insert form name as a string") property to figure out how many statements are there ... e.g. FormCount("T2125") will tell you how many T2125's there are. You would then access all of the field codes by subtracting 1 from the result. If there is 1 T2125 statement, the field code for that statement will be [0,x]; if there are two T2125's, the second statement's field codes would be [1,x] and so on...

The number that appears in the top of the form will match the FormCount property.

Hope that helps!
Dave
0

#4 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 474
  • Joined: 02-November 02
  • Location:Peterborough

Posted 15 June 2010 - 05:02 PM

Thanks Dave. I'll check it out tonight.

Kevin
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users