LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Refreshing Object Properties after "Set"

G'day there Tom,

Set gRng = Nothing
On error Resume Next
Set gRng = dSht.Range("wrkRanks")
On Error goto 0


Of course!! That makes sense. I've used the "on error" construct
elsewhere, but I thought that using it here would just translate the
same error to another location.

Then when using gRng

if not gRng is nothing then

- code to use gRng
End if


I had used the "if not" line with the above "Set" command, but
without success. This way looks much more logical.

gRnd doesn't refer to the named range wrkRanks.


Well, there was my first mistake =)

It refers to the range
defined by wrkRanks when you set the variable.


That was my second, and was what I learned from those mistakes. So
it wasn't a totally wasted experience.

The only way to refresh that
range as you call it is to set it again or instead of using a variable, use
dSht.Range("wrkRanks") directly.


OK, I can see the mechanism behind it all. Unfortunately,
"Set"ting it again or using the direct approach introduces other
problems that I'd rather not try to deal with at the moment. (Translate
that to mean, "I've not figured out how to do it". I'll stick with your
"On error" & "if not" techniques and exit the subs as necessary.

Thanks very much for your assistance, and explanation, Tom. I
really do appreciate the effort you put in to helping me learn.

See ya
--
Ken McLennan
Qld, Australia
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why do i "sometimes" need to "edit chart object" before "source da Flirty and Blonde Charts and Charting in Excel 1 February 2nd 10 02:07 PM
Excel 2007: "Reference is not valid" when refreshing pivot table Paul Martin[_2_] Excel Discussion (Misc queries) 2 January 5th 10 02:47 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Scroll Bar missing "Control" tab in "Format Properties" dialog box Peter Rooney Excel Discussion (Misc queries) 5 August 24th 06 05:36 PM
"Problems obtaining data" error refreshing Excel pivottable Dan[_19_] Excel Programming 0 August 4th 03 03:17 PM


All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"