Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having a problem using a variable in


I've *******ized the following from a recorded macro but it won't wor
with the variable name 'davvsheet', but it works fine if I specif
workbooks(".....") etc.?

With OSSheet
.Columns("L:L").Select

DAbook.Names.Add Name:="Lookuplist2", RefersToR1C1:= _
"=davvsheet!c1"

Any help would, as always, be much appreciated.

Regards,

Adria

--
Kobayash
-----------------------------------------------------------------------
Kobayashi's Profile: http://www.excelforum.com/member.php...info&userid=87
View this thread: http://www.excelforum.com/showthread.php?threadid=27358

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Having a problem using a variable in

Hi

by placing "davvsheet" in the quotes you've made it a literal string try
RefersToR1C1:= "=" & davvsheet & "!c1"

Cheers
JulieD

"Kobayashi" wrote in message
...

I've *******ized the following from a recorded macro but it won't work
with the variable name 'davvsheet', but it works fine if I specify
workbooks(".....") etc.?

With OSSheet
Columns("L:L").Select

DAbook.Names.Add Name:="Lookuplist2", RefersToR1C1:= _
"=davvsheet!c1"

Any help would, as always, be much appreciated.

Regards,

Adrian


--
Kobayashi
------------------------------------------------------------------------
Kobayashi's Profile:
http://www.excelforum.com/member.php...nfo&userid=871
View this thread: http://www.excelforum.com/showthread...hreadid=273587



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
Variable problem TC[_6_] Excel Programming 3 September 16th 04 09:39 PM
SaveAS w/ a variable name problem Jeffp Excel Programming 2 June 8th 04 12:51 PM
vba variable problem joao Excel Programming 3 December 15th 03 04:31 PM
Mixed variable problem Tom Excel Programming 1 November 7th 03 09:22 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


All times are GMT +1. The time now is 08:30 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"