Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am opening oWB and need to reference a worksheet code name in oWB. I have
the following: Set oRevisionWS = Nothing On Error Resume Next oWB.Activate oRevisionWS = Revisions <~~~worksheet code name On Error GoTo 0 I need to know how to define oRevisionWS to be the worksheet with the code name Revisions. Thanks, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub a()
Dim WS As Worksheet Dim oRevisionWS As Worksheet For Each WS In Worksheets If WS.CodeName = "Revisions" Then Set oRevisionWS = WS Exit For End If Next If Not oRevisionWS Is Nothing Then MsgBox oRevisionWS.Name End Sub -- Jim "Barb Reinhardt" wrote in message ... |I am opening oWB and need to reference a worksheet code name in oWB. I have | the following: | | Set oRevisionWS = Nothing | On Error Resume Next | oWB.Activate | oRevisionWS = Revisions <~~~worksheet code name | On Error GoTo 0 | | I need to know how to define oRevisionWS to be the worksheet with the code | name Revisions. | | Thanks, | Barb Reinhardt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. This is one I just can't seem to remember how to do.
"Jim Rech" wrote: Sub a() Dim WS As Worksheet Dim oRevisionWS As Worksheet For Each WS In Worksheets If WS.CodeName = "Revisions" Then Set oRevisionWS = WS Exit For End If Next If Not oRevisionWS Is Nothing Then MsgBox oRevisionWS.Name End Sub -- Jim "Barb Reinhardt" wrote in message ... |I am opening oWB and need to reference a worksheet code name in oWB. I have | the following: | | Set oRevisionWS = Nothing | On Error Resume Next | oWB.Activate | oRevisionWS = Revisions <~~~worksheet code name | On Error GoTo 0 | | I need to know how to define oRevisionWS to be the worksheet with the code | name Revisions. | | Thanks, | Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to prevent code running when in a worksheet code | Excel Programming | |||
Code Conflicts With Worksheet Change Code | Excel Programming | |||
Referencing Libraries through code. | Excel Programming | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming | |||
Referencing a cell for a value in VBA code | Excel Programming |