-
Solved: turn off features if not found
I am trying to use some code to turn off certain features if I it doesn't find "Division" in V1. This is the code that I am using:
[VBA]Set findString = Detail.Range("V1").Find(What:="Division")
If findString Is Nothing Then
SalesReport.MultiPage1.Pages(5).Enabled = False
End If[/VBA]
unfortunately, it isn't working.
-
What is the error message and what part of the code is giving you grief?
Is SalesReport the name of your form?
Is findString a range object?
-
Moa it isn't giving me an error message it is just not disabling the advanced page in my multipage. Yes, findstring is a range object and salesreport is the name of the form.
-
The code should work fine so maybe you aren't calling the subroutine that holds that code. Have you debugged? I'd use "step into" to see what's going on.
-
I have the subrouting behing the form in the userform_activate mod. is that where it should be?
-
Only other thing would be if you misspelt Division or you are looking in the wrong cell or worksheet
-
Glen,
THank you for your help, it was a stupid mistake-I hade it in userform_click not userform_initialize. THank you
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules