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

Variable problem please help

Status
Not open for further replies.

monasa

IS-IT--Management
Jun 27, 2004
41
0
0
CA
When I execute :
---
Try
If args.value >= 0 And args.value <= 10 Then
args.Isvalid = true
exit sub
end if
Catch args As Exception
If args.value = "R" Then
args.Isvalid = true
exit sub
End If
End Try
---
I had :
BC30616: Variable 'args' hides a variable in an enclosing block
for this line : Catch args As Exception


Thanks in advance
 
change
Catch args As Exception
To
Catch ex As Exception
OR
Catch

The "Catch args As Exception" create a variable named args which hides an already declared args.





Compare Code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top