Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can a workbook variable be set by clicking the workbook?


Okay, thanks. Here goes:

There will be a daily workbook that I would like to add validation to
by code. However, the workbook will be reproduced everyday so I wil
not be able to store the validation code (that I've already created) i
it. Therefore, I have created another workbook to contain the code an
the values I would like to use for validation.
Now, I don't want to create a menu item to run the code but want to ru
the code from the values/code book. However, because the 'daily' boo
will have a very different name each day I'm finding it hard to pas
it's name to a variable in order to select/activate the 'daily
workbook and run the code? I thought that there might be a way to ru
the code from the values/code book with some kind of parameter tha
will prompt the user to select the 'daily' book; ideally by selectin
from the taskbar or, perhaps, by selecting from a drop-down list o
open workbooks?

Hope this makes more sense?

Many thanks,

Adria

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Can a workbook variable be set by clicking the workbook?

Adrian,

why not give a file browser to allow the user to select. Using
GetOpenFilename (see help) you browse and the method passes the full file
name back., You can the open that workbook using the value.

--

HTH

RP

"Kobayashi" wrote in message
...

Okay, thanks. Here goes:

There will be a daily workbook that I would like to add validation to,
by code. However, the workbook will be reproduced everyday so I will
not be able to store the validation code (that I've already created) in
it. Therefore, I have created another workbook to contain the code and
the values I would like to use for validation.
Now, I don't want to create a menu item to run the code but want to run
the code from the values/code book. However, because the 'daily' book
will have a very different name each day I'm finding it hard to pass
it's name to a variable in order to select/activate the 'daily'
workbook and run the code? I thought that there might be a way to run
the code from the values/code book with some kind of parameter that
will prompt the user to select the 'daily' book; ideally by selecting
from the taskbar or, perhaps, by selecting from a drop-down list of
open workbooks?

Hope this makes more sense?

Many thanks,

Adrian


--
Kobayashi
------------------------------------------------------------------------
Kobayashi's Profile:

http://www.excelforum.com/member.php...nfo&userid=871
View this thread: http://www.excelforum.com/showthread...hreadid=273314



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
Double Clicking on link w/i workbook does't bring me to souce. tfranc Excel Worksheet Functions 2 July 19th 06 01:16 PM
Prevent Excel closing all workbook instances when clicking on "X" Deeptech-NM Excel Discussion (Misc queries) 8 July 4th 05 01:36 PM
Workbook name as variable to another workbook Nigel Excel Discussion (Misc queries) 1 May 17th 05 02:26 PM
Can a workbook variable be set by clicking the workbook? Kobayashi[_44_] Excel Programming 2 October 28th 04 10:15 PM
Can a workbook variable be set by clicking the workbook? Kobayashi[_43_] Excel Programming 2 October 28th 04 06:20 PM


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