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
Post a Comment