#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Problem with Macros

Thanks to Dave Peterson I was able to set up my survey form. I am now trying
to insert a submit button with a macro to have the survey forms return
directly to me once completed. I used Ron de Bruins €˜send the
ActiveWorkbook. I set all this up at home then emailed the sheet to myself
at work. When I opened the macro at work it appeared to have created another
email macro which was in a hidden workbook. Even though I couldnt find it I
managed to work around it. Anyway I emailed my survey to a work mate so we
could do a test run using the submit button attached to the macro created by
Ron. Perfect, everything worked fine the sheet came back to me as I had
wanted.
Because of the type of information I needed to collect from different areas
I commenced building further survey forms (60 in all). When I went back into
work this morning I sent another survey to the same colleague for another
trial and the submit button would not work with the comment that it couldnt
find the macro. I had assigned the button to the macro. I sent another with
the same result. The macro was there but it seemed as though the macro had
detached itself from the button. I sent the form home to myself so I could
work on it and when I opened it up at home there were no macros at all they
had all completely disappeared. I am sorry this is so long and drawn out but
I wanted to give you as much info as possible. Any help would be greatly
appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Problem with Macros

You are dealing with differrent fire-wals at work and at home. the macro at
home may of been removed by your server at hmoe or some software running on
your PC.

I'm not sure why the button detached itself from the macro. This could be a
firewall or a programming bug. Can't tell.

when you write macros using multiple workbooks open at the same time make
sure you are writing to the correct workbook. Refere to the workbook with
the macro using This workbbok. Other workbooks set a variable to the other
workbook like this

workbooks.add
set newbk = activeworkbook ' the new workbook always becomes the active
'workbook


or

workbooks.open filename:=MyBook.xls
set newbk = activeworkbook


the refer to the newbk in all your code

with newbk
.sheets("Sheet1").Range("A1")

end with



"Lynda" wrote:

Thanks to Dave Peterson I was able to set up my survey form. I am now trying
to insert a submit button with a macro to have the survey forms return
directly to me once completed. I used Ron de Bruins €˜send the
ActiveWorkbook. I set all this up at home then emailed the sheet to myself
at work. When I opened the macro at work it appeared to have created another
email macro which was in a hidden workbook. Even though I couldnt find it I
managed to work around it. Anyway I emailed my survey to a work mate so we
could do a test run using the submit button attached to the macro created by
Ron. Perfect, everything worked fine the sheet came back to me as I had
wanted.
Because of the type of information I needed to collect from different areas
I commenced building further survey forms (60 in all). When I went back into
work this morning I sent another survey to the same colleague for another
trial and the submit button would not work with the comment that it couldnt
find the macro. I had assigned the button to the macro. I sent another with
the same result. The macro was there but it seemed as though the macro had
detached itself from the button. I sent the form home to myself so I could
work on it and when I opened it up at home there were no macros at all they
had all completely disappeared. I am sorry this is so long and drawn out but
I wanted to give you as much info as possible. Any help would be greatly
appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Problem with Macros

Thank you Joel, i wasn't aware of the multiple workbook issue, i will check
that. And you could be right about the firewall as well as i work in a
government department. I am very frustrated as i have created so many sheets
and it appears i may have to go through and attach the macro to them all
again. These surveys are being sent to executives who always seem to have an
excuse as to why they don't have time to do these things so i thought if i
made it as simple as possible so all they had to do was click a few buttons
then maybe i could get them to respond. My other problem is i am being pushed
by a deadline to get these things out. I will try your macros at work rather
than at home so i don't end up with the same problem. Thank you again.
"Joel" wrote:

You are dealing with differrent fire-wals at work and at home. the macro at
home may of been removed by your server at hmoe or some software running on
your PC.

I'm not sure why the button detached itself from the macro. This could be a
firewall or a programming bug. Can't tell.

when you write macros using multiple workbooks open at the same time make
sure you are writing to the correct workbook. Refere to the workbook with
the macro using This workbbok. Other workbooks set a variable to the other
workbook like this

workbooks.add
set newbk = activeworkbook ' the new workbook always becomes the active
'workbook


or

workbooks.open filename:=MyBook.xls
set newbk = activeworkbook


the refer to the newbk in all your code

with newbk
.sheets("Sheet1").Range("A1")

end with



"Lynda" wrote:

Thanks to Dave Peterson I was able to set up my survey form. I am now trying
to insert a submit button with a macro to have the survey forms return
directly to me once completed. I used Ron de Bruins €˜send the
ActiveWorkbook. I set all this up at home then emailed the sheet to myself
at work. When I opened the macro at work it appeared to have created another
email macro which was in a hidden workbook. Even though I couldnt find it I
managed to work around it. Anyway I emailed my survey to a work mate so we
could do a test run using the submit button attached to the macro created by
Ron. Perfect, everything worked fine the sheet came back to me as I had
wanted.
Because of the type of information I needed to collect from different areas
I commenced building further survey forms (60 in all). When I went back into
work this morning I sent another survey to the same colleague for another
trial and the submit button would not work with the comment that it couldnt
find the macro. I had assigned the button to the macro. I sent another with
the same result. The macro was there but it seemed as though the macro had
detached itself from the button. I sent the form home to myself so I could
work on it and when I opened it up at home there were no macros at all they
had all completely disappeared. I am sorry this is so long and drawn out but
I wanted to give you as much info as possible. Any help would be greatly
appreciated.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros Problem Gary Excel Discussion (Misc queries) 3 September 17th 07 03:08 PM
Problem with copy and paste together with macros Camper Joe Excel Worksheet Functions 2 August 24th 06 05:24 PM
tough problem, maybe macros will solve it milos New Users to Excel 6 June 16th 06 10:55 AM
Problem Assigning Macros Rafe Excel Worksheet Functions 2 June 17th 05 06:40 PM
Problem with running Macros Mark Alex Excel Discussion (Misc queries) 1 May 17th 05 02:28 PM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"