Macro disappears!

G

Geoff

I have a protected form saved as a Word 2007 macro-enabled template. When a
button is clicked on the form, the macro copies all the data to the next
available row in an Excel 2007 spreadsheet.

Another person uses the template and it has been working fine for the past
few months on both our computers. Both have the same version of Office, the
same OS (XP Pro), the same macro-security levels, and save to the same
spreadsheet. We both use the exact same template the same way - by selecting
it from the list of templates available when New is selected from the menu.

Something happened though when I added another field yesterday. When I click
the button on my computer after completing the form, the macro runs fine.
When she clicks it, nothing happens. If she opens the VB window to look at
the code, it's not there...even before she enters any data.
 
D

Doug Robbins - Word MVP

Did you open the template to add the field, or did you add the field to a
document created from the form which you then saved as a template?

It sounds like you cannot both be creating the documents from the same
template.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 
G

Geoff

Doug Robbins - Word MVP said:
Did you open the template to add the field, or did you add the field to a
document created from the form which you then saved as a template?

I modified the template. The changes are there.
It sounds like you cannot both be creating the documents from the same
template.

Why would the macros be in the template when I open it and when she opens
the same one they are not there? I totally cannot get my head wrapped around
this.
 
G

Geoff

The macros seem to disappear when I do a Save As and select Macro-enabled
template.

And I was also getting a compile error all of a sudden on the following
statement:

Dim oXL As Excel.Application

Cool...looks like I need to select Excel 12.0 Object Library...again. I
wonder why that happened?

Anyhoo...it looks like I got it all going now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top