Correct way to call active worksheet?

  • Thread starter Thread starter Locutis
  • Start date Start date
L

Locutis

Hello,

What is the correct way to call upon the active worksheet?
I want my code to call the active worksheet (ActiveSheet) that I am
currently in, rather than calling up a certain sheet by name as I am doing
below:

Private Sub CBWP_Click()
Worksheets("BIDWORKUP").Range("B48").Value = "Waterproofing"
Worksheets("BIDWORKUP").Range("H48").Value = 1.45
Worksheets("BIDWORKUP").Range("B62").Value = "Waterproofing"
Worksheets("BIDWORKUP").Range("H62").Value = 1#
End Sub

Help!

LB
 
this might be better

with activeworksheet
..Range("B48") = "Waterproofing"
..Range("H48") = 1.45
..Range("B62") = "Waterproofing"
..Range("H62") = 1#
end with
 
Think Don actually meant:


with activesheet
..Range("B48") = "Waterproofing"
..Range("H48") = 1.45
..Range("B62") = "Waterproofing"
..Range("H62") = 1#
end with

since there is no ActiveWorksheet object (although I try to use it all the
time <g>)
 
Darn.

with activesheet
.Range("B48,b62") = "Waterproofing" 'improvement to make up for it
.Range("H48") = 1.45
.Range("H62") = 1#
end with
 
Back
Top