LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Initializing a dictionary and then modifying it.

I have a dictionary object which I need to:

1) Create and modify upon opening the workbook (it draws data from the
workbook for its keys and objects)

2) Read and write to in userform and module level code

I haven't used dictionaries before. Can someone point out where I have
gone wrong? It is giving me a Error: Variable not defined at the Module
level code.

What follows isn't my actual code, but it should give you an idea of
what I am trying to do.

<This Workbook
'Declarations
Option Explicit
Public dictCornerCellPics

Private Sub Workbook_Open()
Set dictCornerCellPics = CreateObject("scripting.dictionary")
dictCornerCellPics.add "a", worksheets(4).cells(1,2)
dictCornerCellPics.add "b", worksheets(4).cells(2,2)
...etc....
End Sub
</This Workbook

<module code

Public Sub MakeCorners (strng as String) as Boolean
dictCornerCellPics.add strng, worksheets(3).cells(1,1)
...etc....
MakeCorners = dictCornerCellPics.exists("a")
End Sub
</module code

Thanks in advance, (someday, in a galaxy far far away, I'll be able to
end a post with HTH...)

-Abe

 
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
XL 07 Initializing Folders reno Excel Discussion (Misc queries) 0 April 20th 07 07:32 PM
stop userform from initializing JT[_2_] Excel Programming 3 March 4th 05 07:18 PM
Initializing Combobox in a Userform Neal[_5_] Excel Programming 2 September 15th 04 12:19 AM
Initializing Userform Szadkowski Excel Programming 1 August 31st 04 12:35 AM
Initializing User Forms Tom Ogilvy Excel Programming 3 June 28th 04 10:07 PM


All times are GMT +1. The time now is 06:56 AM.

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"