Apologies in advance for the length of this posting.
I'm trying to 'import' a data sheet into my main workbook, which has some sheets with controls on. When I open the sheet to import it opens in a new workbook (of course), which immediately becomes active. So far, so good.
However the main workbook has some Combo controls which detect change events, and these activate, causing an error because the Combo control reference doesn't exist in the new active workbook.
So, I could preface these with the main workbook name, but the workbook name may change.
So, I use the ThisWorkBook. prefix, but having included it for all the affected controls the workbook becomes unstable and gives Windows errors when I try to save it.
So I try the alternative of setting EnableEvents to False, but it seems that events are still tracked before being ignored, because the errors continue. :-(
Am I unlucky or misguided? Has anyone else ever tried to do anything similar and survived?
I'm trying to 'import' a data sheet into my main workbook, which has some sheets with controls on. When I open the sheet to import it opens in a new workbook (of course), which immediately becomes active. So far, so good.
However the main workbook has some Combo controls which detect change events, and these activate, causing an error because the Combo control reference doesn't exist in the new active workbook.
So, I could preface these with the main workbook name, but the workbook name may change.
So, I use the ThisWorkBook. prefix, but having included it for all the affected controls the workbook becomes unstable and gives Windows errors when I try to save it.
So I try the alternative of setting EnableEvents to False, but it seems that events are still tracked before being ignored, because the errors continue. :-(
Am I unlucky or misguided? Has anyone else ever tried to do anything similar and survived?