Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
2003
My Macro is supposed to add a sheet and list information related to the location of a Circular Reference. When I first forced a circular reference (for testing the macro), the following VBA query works in the Immediate window: ? ActiveSheet.CircularReference.Address $F$10 If I run another macro to check for other "errors" then go back to the check for the known circular reference - the result is: ? ActiveSheet.CircularReference.Address Runtime error '#91' Object variable or With block variable not Set In addition to the error my macro does not create the intended report because the initial status of ActiveSheet.CircularReference is, I guess Null or Nothing, instead of True. What is happeninhg here that is avoiding my brain. And what do I need to do to cause the VBA Code to print the report when I thought that it should have? TIA EagleOne |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Well, I think that I may have the answer. I need to Select the CR
first: Worksheets("Sheet1").CircularReference.Select Apparently, that is the "Set" that the code needs. If there is more to the picture, please offer some thoughts EagleOne EagleOne wrote: 2003 My Macro is supposed to add a sheet and list information related to the location of a Circular Reference. When I first forced a circular reference (for testing the macro), the following VBA query works in the Immediate window: ? ActiveSheet.CircularReference.Address $F$10 If I run another macro to check for other "errors" then go back to the check for the known circular reference - the result is: ? ActiveSheet.CircularReference.Address Runtime error '#91' Object variable or With block variable not Set In addition to the error my macro does not create the intended report because the initial status of ActiveSheet.CircularReference is, I guess Null or Nothing, instead of True. What is happeninhg here that is avoiding my brain. And what do I need to do to cause the VBA Code to print the report when I thought that it should have? TIA EagleOne |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is great, an excellent dialog with myself. But for all who can
benefit: The sequence to "set-up" the ability to obtain the CircularReference.Address is: Sub GetCircularReferenceAddress() ..... previous code Calculate ' Must force a calculation before "Select" On Error Resume Next MyWorksheet.CircularReference.Select MyWorksheet.CircularReference.Address ...... other code End Sub EagleOne wrote: 2003 My Macro is supposed to add a sheet and list information related to the location of a Circular Reference. When I first forced a circular reference (for testing the macro), the following VBA query works in the Immediate window: ? ActiveSheet.CircularReference.Address $F$10 If I run another macro to check for other "errors" then go back to the check for the known circular reference - the result is: ? ActiveSheet.CircularReference.Address Runtime error '#91' Object variable or With block variable not Set In addition to the error my macro does not create the intended report because the initial status of ActiveSheet.CircularReference is, I guess Null or Nothing, instead of True. What is happeninhg here that is avoiding my brain. And what do I need to do to cause the VBA Code to print the report when I thought that it should have? TIA EagleOne |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 loses the links to other excel spreadsheets on a server | Excel Discussion (Misc queries) | |||
Fillable form loses fillable fields when emailed - how do I fix | Excel Worksheet Functions | |||
Excel workspace loses formatting | Excel Discussion (Misc queries) | |||
Pie PivotChart loses data label every time i swich page value | Charts and Charting in Excel | |||
Concatenation formula loses text wrap formatting | Excel Discussion (Misc queries) |