Excel add-in - get workbook name of "thisworkbook" -
i can't name of workbook when use add-in.
i'm trying develop add-in runs each time open excel , reads filename of open file.
if file name xcfil.skv
something...
this code should it, doesn't. missing?
code stops , if debug , press f8 works fine, won't run on it's own.
private sub workbook_open() if thisworkbook.name = "xcfil.skv" msgbox "y" end if end sub
background:
based in statement the code stops , if debug , press f8 works fine, won't run on it's own. assume problem relies on speed of processor not sync code (own experience).
solution:
since excel , problem seems rely in opening of instance itself, may use application wait or any of other functions matter.
further thoughts:
life cycle comes mind in these kind of scenarios. this web page has neat lifecycle diagram of excel instance (attached since try explain scenario)
as may see "application" first cycle of excel application, followed "open" , after "workbook" object, may happen in life cycle "worbook" has not been created when "open" comes play,hence, need wait until excel solves this.
Comments
Post a Comment