Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA problem pulling data out of variant/range input variables

I have a VBA function that takes a named range as an input. The range
contains formulas with links to real-time fields. In the first line of
the function, I pull out the values field of the range: x =
InputX.Values (or x = InputX.Values2; both produce the same problem).
Usually this returns a Variant with the values in the range, but
occasionally it returns a Variant with empties in all the fields. Any
ideas what's causing this and how to prevent it?

Thanks,
Marc

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA problem pulling data out of variant/range input variables

what you show is a variable that references a range.

a named range named InputX would be

x = Range("InputX").Value

probably just a terminology thing.

I have never seen it return a range of empties, but I recall seeing a
knowledge base article which alluded to a problem with dates I believe in
this situation, but I don't know if it matches your situation and I can't
find the article. (sorry).

--
Regads,
Tom Ogilvy

wrote in message
oups.com...
I have a VBA function that takes a named range as an input. The range
contains formulas with links to real-time fields. In the first line of
the function, I pull out the values field of the range: x =
InputX.Values (or x = InputX.Values2; both produce the same problem).
Usually this returns a Variant with the values in the range, but
occasionally it returns a Variant with empties in all the fields. Any
ideas what's causing this and how to prevent it?

Thanks,
Marc



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA problem pulling data out of variant/range input variables

Hi Tom,

The different terminology didn't fix it. The really odd thing is that
I pass in several different range variables, and the problems only
happens for two of them. Those two ranges have formulas in them that
ultimately depend on a live bloomberg feed, so I'm guessing that has
something to do with it. In any case, the exact same code worked
yesterday, but not today...

The last time this happened the only way I could fix it was to delete
the named range and all the formulas, and then repopulate them...

Reply
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
Variant valiables problem [email protected] Excel Discussion (Misc queries) 0 October 8th 08 10:05 PM
Pulling Data that falls within a specific date range? mobius9oo Excel Worksheet Functions 3 September 11th 08 10:05 PM
formula pulling data based on 1 input on another tab. bmo Excel Worksheet Functions 0 October 9th 07 08:22 PM
Pulling Data from Range dthmtlgod Excel Programming 1 October 12th 04 07:40 PM
How to define a Range with variant? Yiu Choi Fan Excel Programming 6 July 12th 04 04:41 PM


All times are GMT +1. The time now is 07:57 PM.

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

About Us

"It's about Microsoft Excel"