command button

G

Guest

Hello,
I have recently used a sum by color function which
requires the user to press "ALT F9" to execute. I am
trying to create a command button that, when clicked,
would execute this command. So far I have;

"%{F9}",True

I am having trouble writing the rest of the code to get
this function to work. Any ideas?

Thanks
 
F

Frank Kabel

Hi
you may use
sub foo()
sendkeys "%{F9}",True
end sub

or just add the line
application.volatile
to your colorindex function
 

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