Thread
:
Where to store lookup table
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Where to store lookup table
Try this idea
Public mv 'place at the top of the module. Change the mv in your sub and
run it.
Sub checkselectem1()
mv = 1
selectem
End Sub
Sub checkselectem2()
mv = 2
selectem
End Sub
Sub selectem()
Select Case mv
Case 1: x = 1
Case 2: x = 2
Case Else
End Select
MsgBox x
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Greg Snidow" wrote in message
...
Don, thanks for the quick reply. I thought about that, but then wouldn't
I
need to put the long case statement into every macro I have, and into
every
new one? I was looking to make it available as an object.
"Don Guillett" wrote:
How about using SELECT CASE in your macro. Then you don't need a table.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Greg Snidow" wrote in message
...
Greetings folks. I have a lookup table stored in a workbook, that has
three
columns, and about 200 rows. I use it in macros in about 10 other
workbooks
that I send out to people. The problem is that with every workbook I
send
out, I need to insert the lookup worksheet into the workbook in
question,
run
the macros, then delete it. Is there a way I could store the values of
the
lookup table in Excel, so it would be available to every new work book
I
open? I have absolutely no idea if this is possible, or how to do it
if
it
is. Thank you.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett