View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Finance Guru Finance Guru is offline
external usenet poster
 
Posts: 83
Default Macro Button in a work sheet

Hello Dave - Thanks for that,but what I really want is the button within the
worksheet,as the user(s) will not always know how to run a macro,hence the
requirement for the button to allow the user to click on,and let the macro
behind it do all the work.


"Dave Peterson" wrote:

You can write your code so that you're only using the active sheet.

Option Explicit
Sub testme()
with activesheet
msgbox .name 'just to verify
.range("b9,c22,e3:g9,h:h,w:x").clearcontents
end with
end sub

Finance Guru wrote:

Hello people,

How can i put a button into my worsheet,and attach a macro to it. so that
the button is only relevant to that w/sheet. I know how to drag a button on
the Toolbar from the Forms toolbar and attach a macro,but the same process
doesn't appear to work for my problem.

What I actually want to do is press this button which will then clear down
designated cells prior to use.

I am using Excel 2004

All offers of help gratefully accepted
FG


--

Dave Peterson