excel - Public variables and Workbook_Open function -


i want initialize variable (like ranges graphs) in workbook_open function in thisworksheet. done like:

public chartsizeposition range sub workbook_open()     set chartsizeposition = range("b8:i25")     worksheets("Übersicht").range("a1").value = "q3f" end sub 

afterwards want access variable sub in module. there given error "runtime error 424. object necessary". workbook_open code reached.

anyone can give me suggestion?

best regards , thanks!

if add public variable class module (which thisworkbook is) have refer variable member of class. have refer thisworkbook.chartsizeposition rather chartsizeposition.

alternatively can move declaration normal module.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -