Hello,
Thanks for the help, but I am not there yet :-)
I will explain my question with an example:
1. I have an excel file with a sheet in it called "Sheet 1" which contains a table with data
2. I will execute a macro - let's call it "filter-macro" (in personal.xlsb) on this sheet
3. This macro will filter the data in "Sheet 1" based on a value in column A (let's say column A contains the value "apple" or "cherry")
4. So first I filter on "apple", copy all the data to a new sheet "Apple". In this sheet my macro creates a button "reply"
5. Second I filter on "cherry", copy all the data to a new sheet "Cherry". In this sheet my macro creates a button "reply"
6. My macro has also made a new sheet "main" where there are 2 buttons "apple" and "cherry"
7. When I press on "apple" the apple-sheet is copied to a new workbook and mailed to a given emailaddress
8. The same for "cherry"
What I want is that my senders can open the file, complete it (fill in some fields) and afterwards press "reply". "Reply" should e-mail the file back to a given mailbox (after giving it a name). This is done with the macro "Sub reply", a simple macro that will give the file a name and mail the file.
Now comes the problem: my macro "filter-macro" creates a new sheet "apple" when pressed on the apple button in sheet "main" and imports a bas-file in this newly created file. This bas-file contains "Sub reply". When the macro "filter-macro" creats the button "reply" it connects this button to the "Sub reply". But for some reason when my receiver opens this file and presses reply it does not execute "Sub reply" but is looking for it in another workbook, I think "Sheet 1" where my original macro "filter-macro is"
Help ...
Bookmarks