03-24-2011, 12:19 PM
Manish -
That is not correct. Workspace_check and workspace_chkbox are different variables.
Option Explicit is a good suggestion.
Sharmila -
The issue is with regards to either a shift in the location of the object or index. One of the ways i can suggest is to use On Error Resume next.
Try this code,
That is not correct. Workspace_check and workspace_chkbox are different variables.
Option Explicit is a good suggestion.
Sharmila -
The issue is with regards to either a shift in the location of the object or index. One of the ways i can suggest is to use On Error Resume next.
Try this code,
Code:
Dim workspace_chkbox
On Error Resume Next
col_cnt = Browser("NPDM").Page("ENOVIA").Frame("MainFrame").WebTable("WorkspaceTable").GetROProperty("cols")
row_cnt = Browser("NPDM").Page("ENOVIA").Frame("MainFrame").WebTable("WorkspaceTable").RowCount
For i = 1 to row_cnt
Workspace_Check= Browser("NPDM").Page("ENOVIA").Frame("MainFrame").WebTable("WorkspaceTable").GetCellData(i,col_cnt)
If trim(Workspace_Name) = trim(Workspace_Check) Then
Set workspace_chkbox = Browser("NPDM").Page("ENOVIA").Frame("MainFrame").WebTable("WorkspaceTable").childitem(i,1,"WebCheckBox",0)
workspace_chkbox.Click
msgbox Err.Number & " Error Number"
Msgbox Err.Description & " Error Description"
Exit For
End If
Next
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.