02-12-2010, 08:08 PM
It not as easy as my code may not be doing anything similar to what you want but here is my code anyway:
Code:
'First to get the row count:
Num_Rows = TaxEntryTable.Object.ActiveSheet.rowcount
'To set Active Cell:
TaxTable.Object.ActiveSheet.SetActiveCell 0,1
'Now I will loop down the table to find the row I need
newcount=0
For i = 0 to Num_Rows -1
numrow=i
seti=i
TaxTable.Object.focus()
myval = GetCell(TaxTable.Object,numrow, 1)
IsCityRecord = Instr(1,myval,"(",1)
If IsCityRecord > 0 Then
CityRecord = Split(myval,"(")
myval = CityRecord(0)
End If
If myJuris = Trim(myval) Then
tempJuris=i
TaxTable.Object.ActiveSheet.SetActiveCell tempJuris,1
Exit For
End if
newcount=newcount +1
Next
'then When I found the row I wanted enter data:
Set WshShell = CreateObject("WScript.Shell")
If LocalJurisLevel="CNTY" Then
WshShell.SendKeys " {RIGHT}"
wait 1
WshShell.SendKeys " {F2}"
SwfWindow("Vertex Sales Tax Returns").SwfWindow("Tax Data Manual Entry").SwfEdit("CurrencyCellTypeEditor").set MyLocalAmnt
WshShell.SendKeys " {ENTER}"