With statement question

  • Thread starter Thread starter Patrick C. Simonds
  • Start date Start date
P

Patrick C. Simonds

The code below works great if the worksheet "Holidays" is active. I need it
to work when Holidays is not the active worksheet.


With Sheets("Holidays")
If range("L1") = "No Picture" Then
Intentions.Show
End If
End With
 
The code below works great if the worksheet "Holidays" is active. I need it
to work when Holidays is not the active worksheet.


With Sheets("Holidays")
If range("L1") = "No Picture" Then
Intentions.Show
End If
End With

Bad syntax.

Try:

With Sheets("Holidays")
If .range("L1") = "No Picture" Then
Intentions.Show
End If
End With

Note the "." before Range
--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top