Macros in 2007

  • Thread starter Winnipeg Michael
  • Start date
W

Winnipeg Michael

I had a spreadsheet in 2003, called PERSONAL.xls. In it, was two macros,
that sent me to specific cells. Each time I opened up an .xls, the
PERSONAL.xls would open, then the spreadsheet I wanted would follow. The
macros would be enabled without any problems.
How can I have this happen again in Excel 2007? I'm having problems trying
to perform this same action again.

Thank you.
 
D

Dave Peterson

You should be able to copy that personal.xls and put it into xl2007's XLStart
folder. And then the behavior should be the same.

Did you try that? And what happened when you did?
 
W

Winnipeg Michael

Yes, tried it, but I receive this error:
Cannot run the macro "A1". The macro may not be available in this workbook,
or all macros may be disabled.

Soooooo, I have to disable them?
 
D

Dave Peterson

Do you have a macro named A1 in that workbook?

If you do, you'll want to enable those macros.

Did you get prompted when you opened the personal.xls workbook to enable the
macro--you may have seen a horizontal prompt just above the worksheet area and
formulabar, but below the ribbon.

(I use a personal.xla (addin file) in xl2007) and it's placed in my XLStart
folder. I don't get prompted to enable the macros.)

You may want to check your security settings, too.
It's under:
Office Button}|Excel Options|Trust Center
 
W

Winnipeg Michael

I have two macros. The first one, goes to the A1 cell. The second one goes
to the AF60 cell. They both work in the Personal.xls spreadsheet. When I
open up a second Excel spreadsheet, the macros dont work (the error message
as noted below).

There was no prompt when I open the Personal.xls. When I open up a
different Excel spreadsheet, the Personal.xls opens up (as it should), then
the spreadsheet I want to work on opens (as it should), but there is no
prompt from either spreadsheets.

What would the preffered security settings be, so that these two macros work?

Thanks for your help.
 
D

Dave Peterson

How do you run the macros?

If you change the name to something that doesn't look like cell addresses
(GOTO_A1 and GOTO_AF60), do they work?

I don't think it's any setting that you have to change.

Winnipeg said:
I have two macros. The first one, goes to the A1 cell. The second one goes
to the AF60 cell. They both work in the Personal.xls spreadsheet. When I
open up a second Excel spreadsheet, the macros dont work (the error message
as noted below).

There was no prompt when I open the Personal.xls. When I open up a
different Excel spreadsheet, the Personal.xls opens up (as it should), then
the spreadsheet I want to work on opens (as it should), but there is no
prompt from either spreadsheets.

What would the preffered security settings be, so that these two macros work?

Thanks for your help.
 
W

Winnipeg Michael

As an example, here is the AF60 macro:

Sub AF60()
Range("AF60").Select
End Sub

They worked before, as shown. Are you suggesting to use the GOTO instead?

Thanks!
 
D

Dave Peterson

Nope. I'm suggesting that you try changing the name of the macro:

Sub GOTO_AF60()
Range("AF60").Select
End Sub

And you didn't answer this question:


Winnipeg said:
As an example, here is the AF60 macro:

Sub AF60()
Range("AF60").Select
End Sub

They worked before, as shown. Are you suggesting to use the GOTO instead?

Thanks!
 
W

Winnipeg Michael

Oh, okay. I get it.

I'll try that.

As for, "how do I run the macros?". I'm not sure what you are asking. I
created the macros, and the macros are to run in all open workbooks.
 
D

Dave Peterson

Do you have a button on the worksheet, do you have a toolbar, do you run it via
the tools|macro dialog (alt-f8) or what?



Winnipeg said:
Oh, okay. I get it.

I'll try that.

As for, "how do I run the macros?". I'm not sure what you are asking. I
created the macros, and the macros are to run in all open workbooks.
 
W

Winnipeg Michael

Gotchya.

I created a button/icon for each of the macros. I put the button on the
Quick Access Toolbar.

I did re-do the macro, as per your suggestion. it works for the
Personal.xls, but not for any other .xls sheets that I open.
 
D

Dave Peterson

Did you remember to reassign the newly renamed macro to the icon on the QAT?
Did you make sure that you point to the personal.xls workbook?

I'd read Ron de Bruin's tips to see if he has any suggestions:
http://www.rondebruin.nl/qat.htm

Winnipeg said:
Gotchya.

I created a button/icon for each of the macros. I put the button on the
Quick Access Toolbar.

I did re-do the macro, as per your suggestion. it works for the
Personal.xls, but not for any other .xls sheets that I open.
 
W

Winnipeg Michael

Yes, and I'm pretty sure yes.

Its something that I am probably missing, that when it is figured out, I'll
go, "oh, yeah, riiiiiiiiiiiight."

Thanks for the link. I'll give that a good looksie

Thanks,
 

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