Error in DialogSheets

  • Thread starter Thread starter tapanmishra
  • Start date Start date
T

tapanmishra

Hi

I am using one of the dialogueSheet function. i am getting subscript
out of range in the first line . can anyone suggest anything. help is
appreciated.

Dim DBoxOk As Boolean
Dim DBox As DialogSheet

Sub InitMainMenu()
' Set object variables
Set DBox = DialogSheets("bomenu")
Set monthlist = DBox.DropDowns("month_list")
Set yearlist = DBox.DropDowns("year_list")
Set rucoa = DBox.CheckBoxes("ru_coa")
Set rustate = DBox.CheckBoxes("ru_state")
Set rubas = DBox.CheckBoxes("ru_bas")

what does "bomenu" means . can it be any word or it is some
pre-requisite.


thanks
tapan
 
Hi Tapan

bomenu is simply the name of the dialog sheet used in the original code, the name on its
sheet tab. Rename your dialog, or replace bomenu with the real dialog name, or simply put
its index number there (which is 1 if you have only one dialog):

Set DBox = DialogSheets(1)

The rest of the things in quotes are also names, so rename them either in the code or in
the dialog, ot use their index numbers like above. Ulike userforms, dialog controls are
members of spesific collections, so numbers are fine.
 
Back
Top