View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Dictionary troubles. Declaring and checking .exists

Abe

Change
dictCornerCellPics("a").exists
to
dictCornerCellPics.exists("a")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Abe" wrote in message
ps.com...
I have a dictionary, declared in a module as:
Public dictCornerCellPics

Workbook_Open() contains the Set of the dictionary, as below:
Set dictCornerCellPics = CreateObject("Scripting.Dictionary")


A userform in the project contains a cmdButton_click() line of:
If dictCornerCellPics("a").exists then

This returns a "Run time error: Object Required"

Do all of the uses of dictCornerCellPics have to be in the
module that
it is declared in?

What else may be wrong?