Thread
:
Same sub different results
View Single Post
#
4
Posted to microsoft.public.excel.programming
DredanZyl[_2_]
external usenet poster
Posts: 1
Same sub different results
Thanks William, that was it. I should have put 'Active workbook'.
William wrote:
*Hi DredanZyl
Do you have a defined name called "Whatever" in "Personal.xls" sinc
your
code refers to that name in "ThisWorkbook" which is the workboo
executing
the sub. Do you mean "ActiveWorkbook".
--
XL2002
Regards
William
"DredanZyl " wrote i
message
...
| Can anyone tell me why the very same sub gives different result
when
| run from the Personal.xls workbook? Here is the code:
|
| Sub VLookUpRange()
| Dim rName As Name
| Set rName = ThisWorkbook.Names("WhatEver")
| End Sub
|
| This sub works fine with all workbooks except Personal.xls.
|
| I get the 'Run time error 1004 - application defined o
object-defined
| error' when I try to run it from Personal.xls
|
|
| ---
| Message posted from
http://www.ExcelForum.com/
|
--
Message posted from
http://www.ExcelForum.com
Reply With Quote
DredanZyl[_2_]
View Public Profile
Find all posts by DredanZyl[_2_]