Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default add a button on a spreadsheet that runs a macro

I have set up a payroll spread sheet in the PC's we have in our stores in 9
states. Payroll is requesting the sheet be sorted alphabetically before
being faxed or emailed to them. I set up a control S to sort but wondered if
an activeX button in the spread sheet would work [left click with a mouse]
since the majority of the managers in the stores are not into computers. If
it would work How would I set it up and lock it so they could not mess it up?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default add a button on a spreadsheet that runs a macro

Sure

Record a macro when you do it manual and you can enter the macro name in the button click event

You can use something like this with headers in row 1 and your data start in A2
This sort on column A

Range("A1").CurrentRegion.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Easygoin123" wrote in message ...
I have set up a payroll spread sheet in the PC's we have in our stores in 9
states. Payroll is requesting the sheet be sorted alphabetically before
being faxed or emailed to them. I set up a control S to sort but wondered if
an activeX button in the spread sheet would work [left click with a mouse]
since the majority of the managers in the stores are not into computers. If
it would work How would I set it up and lock it so they could not mess it up?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
Custom Toolbar Button No Longer Runs Assigned Macro Bryan Excel Discussion (Misc queries) 1 April 10th 06 06:02 PM
Run macro but let user update spreadsheet while it runs Ev Excel Programming 5 September 9th 05 07:57 PM
Macro attached to button runs twice Jozef[_2_] Excel Programming 0 November 4th 04 01:36 PM
Control Button is still selected after macro runs Dave[_47_] Excel Programming 1 October 6th 04 09:38 PM


All times are GMT +1. The time now is 01:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"