Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

macros does not work when the file is reopened

  Asked By: Lambodar    Date: Nov 13    Category: MS Office    Views: 829
  

I have some marcos in a template, when i insert a sheet the macros
works fine. i save the file and close it. if i open the same file
again, the macros does not work.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Aaminah Khan     Answered On: Nov 13

We need more information...............

 
Answer #2    Answered By: Anne Powell     Answered On: Nov 13

I have a template  with 2 comboboxes.combobox1 has the values :Day,
Month, Year

It works like this:
If i select Day in combobox1, the combobox2 displays the values from
Sumday to saturday.
If i select Month in combobox1, the combobox2 displays the values from
January to December.

When in insert  another sheet, the above mentioned thing works, then i
save the file  and close  it. but the problem starts when i reopen the
file :

The combobox1 does not hold value Day,Month, Year anymore( the values
does not appear), it will have the value that i had selected before
closing the file. This does not happen for the sheet1. i find this
problem for all the other sheets that i insert .

 
Answer #3    Answered By: Tate Thompson     Answered On: Nov 13

The combo boxes are probably being initialized when the workbook is
opened (e.g. by the Workbook_Open sub). The initialization routine
may be only written for Sheet1. Find the initialization routine and
make sure it covers all sheets.

 
Answer #4    Answered By: Charlie Evans     Answered On: Nov 13

The mistake was that the initialization routine was
only written for Sheet1. Thanx, its working now.

 
Didn't find what you were looking for? Find more on macros does not work when the file is reopened Or get search suggestion and latest updates.




Tagged: