Macros dont work when file used on another computer

L

Leanne

I have built a file with forms and macros but I can not transfer this to
another computer without it failing to find some of the macros. they are all
recorded within the file, either in the module or in individual sheets and
buttons. Can anyone tell me how to get around this. I will need to
distribute this to people throughout the UK so I will not be able to reasign
everything each time.

Thanks
 
Y

ytayta555

Maybe in this macro you open am workbook
and the path is not the same in another computer ;
if you public the macro here , sure you'll get
help here .

maybe help ...
 
D

Dave Peterson

Are you building a toolbar or adding something to the menubar?

If you are...

I think your life will be lots easier if you create that toolbar when the
workbook opens and destroy it when the workbook closes.

Some references if you want to look at that option:

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

In xl2007, those toolbars and menu modifications will show up under the addins.
 
L

Leanne

Hi Dave,

Yes I have a toolbar and that is one of the things that isnt working so I
will check out those sites suggested. The other parts that dont work are MS
queries - any ideas on those?
 
L

Leanne

Hi Dave,
Do the macro's you asign need to be saved in a particular way or place? I
have followed your instructions but it tells me the macro can not be found.
They are still saved in the workbook (which incidently is being access via a
usb while trying to resolve these issues on another pc)
 
D

Dave Peterson

First, I don't know enough about queries to help.

Second, the macros should be stored in general modules.

There were a few techniques in that post. Which one did you use?

If you used the toolbar method from Debra Dalgleish's site, did you remember to
change the macro names?
 
L

Leanne

Fair enough on the queries.

Should the macro's be stored in a module in the add in workbook?

Sorry I am realising that I know very little about macros and vba.

Yes i used your method from Debra's site. Fair question but yes I changed
the names - only bit I didn't change was the last part of the code with
msgbox.
 
D

Dave Peterson

That's were they belong.

Without more details, I'm stuck.

Did you save the file as an addin?
Did you reopen that addin?
Did you allow macros to run?
What happened?


Fair enough on the queries.

Should the macro's be stored in a module in the add in workbook?

Sorry I am realising that I know very little about macros and vba.

Yes i used your method from Debra's site. Fair question but yes I changed
the names - only bit I didn't change was the last part of the code with
msgbox.
 
L

Leanne

See I knew it was a basic mistake! I didnt copy the macros into the add in
file - I'm having a blonde day!.

Thanks I'll try again and am sure it will work this time
 
L

Leanne

One more question - some of the marcos refer to a form - does that need to be
in the add in file?
 
D

Dave Peterson

I would put the userforms in the addin.

And include some sort of macro that showed those userforms.
One more question - some of the marcos refer to a form - does that need to be
in the add in file?
 

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