Macros and the Toolbar

I

Information

I have some worksheets that we have built for quote and invoicing. I would
like to create some generic macros to reposition me to certain cells in the
spreadsheet, but would like these macros available in several different
files. We have different files with different worksheet names, but the
layout of the data is the same for all. When I click a custom button
assigned to a macro, I would like to jump to a specific cell on the sheet.

I have been able to create the macros, assign them to some buttons, but they
only seem to work on a specific page, and not generically for any worksheet.

Any assistance is greatly appreciated,

Dan
 
N

Nick Hodge

Dan

Without seeing the code it's difficult, but you can put the code in your
personal.xls workbook which makes it available to all open workbooks and the
code should work on the activesheet, rather than a specific sheet name. If
you post the code, I'm sure people will be able to help in more detail

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
[email protected]
 
B

Bob Phillips

sub goto_doors()
application.goto reference:="'" & ActiveSheet.Name & "'!R1225C1"
end sub


Put that macro in Personal.xls as Nick suggested, add a button to a toolbar,
and assign that macro to it

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
B

Bob Phillips

You need to create it.

Personal.xls is located in the XLStart directory, and is used to store
macros and
things that you want to be available to all workbooks, whenever you start
Excel.

You can create it by
- goto Tools>Macros>Record New Macro...
- Choose Personal Macro Workbook form the dropdown
- OK
- click the Stop button on the toolbar that pops-up

You now have a Personal.xls workbbok. It is not visible though, it is hidden
by default (Windows>Unhide)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
I

Information

Thank You!


Bob Phillips said:
You need to create it.

Personal.xls is located in the XLStart directory, and is used to store
macros and
things that you want to be available to all workbooks, whenever you start
Excel.

You can create it by
- goto Tools>Macros>Record New Macro...
- Choose Personal Macro Workbook form the dropdown
- OK
- click the Stop button on the toolbar that pops-up

You now have a Personal.xls workbbok. It is not visible though, it is
hidden
by default (Windows>Unhide)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
I

Information

Quick followup...

I have success in creating these macros, which just move me to a specific
cell in the sheet. The cell appears and is in the bottom left corner of the
sheet. How do I make the cell I move to be in the top left of the sheet?

Thanks for all the help,

Dan
 
I

Information

Thank you again. I have all the info I need for this.

Dan


David McRitchie said:
Hi Dan,
See
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#TopLeft

add to the end of the statement in your macro
, Scroll:=True

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Information said:
Quick followup...

I have success in creating these macros, which just move me to a specific
cell in the sheet. The cell appears and is in the bottom left corner of
the
sheet. How do I make the cell I move to be in the top left of the sheet?
 
P

Patricia Shannon

This will move the row containing the active cell to the top of the sheet,
after any frozen rows:

ActiveWindow.ScrollRow = ActiveCell.Row


Information said:
Thank you again. I have all the info I need for this.

Dan


David McRitchie said:
Hi Dan,
See
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#TopLeft

add to the end of the statement in your macro
, Scroll:=True

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Information said:
Quick followup...

I have success in creating these macros, which just move me to a specific
cell in the sheet. The cell appears and is in the bottom left corner of
the
sheet. How do I make the cell I move to be in the top left of the sheet?

sub goto_doors()
application.goto reference:="'" & ActiveSheet.Name & "'!R1225C1"
end sub
 
Top