Macros and the Toolbar

  • Thread starter Thread starter Information
  • Start date Start date
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
 
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
(e-mail address removed)
 
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)
 
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)
 
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)
 
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
 
This will move the row containing the active cell to the top of the sheet,
after any frozen rows:

ActiveWindow.ScrollRow = ActiveCell.Row
 
Back
Top