By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,457 Members | 1,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,457 IT Pros & Developers. It's quick & easy.

Problem with absolute references

P: 1
Absolute references made in code are not treated the same way as absolute references made in a basic Excel formulas, and I need to work around this issue. I have tried to get around it by setting the cells as a range, but I am having trouble manipulating the range.

I am trying to delete the values within the range, and here is my code:

Dim Rng As Range
Set Rng = "CM_Def_Vol"
Selection.Value = 0

Dim Rng2 As Range
Set Rng2 = "CM_Def_Rev"
Selection.Value = 0

I am getting a type mismatch error.

Anybody know how to fix this?

Thanks! :)
Oct 26 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
Expand|Select|Wrap|Line Numbers
  1. Dim Rng As Range
  2.   Set Rng = "CM_Def_Vol"
  3.   Rng.Select
  4.   Selection.Value = 0
  5. Dim Rng2 As Range
  6.   Set Rng2 = "CM_Def_Rev"
  7.   Rng2.Select
  8.   Selection.Value = 0
I am getting a type mismatch error.
On which line?
Oct 27 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.