LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Make a Cell Act like a Button

I am building a worksheet that builds four database queries that will be
copied and pasted into the DBMS for now. About 80% of each of these queries
never changes, so I use 4 sheets to hold those static elements. The first
sheet of the worksheet contains a zip code and a varying number of streets.
That number of streets determines how long each query string will be. With
10 streets, the queries are 35, 44, 56 and 107 lines long.

Each query has a title cell as the first line that is just there to label
the query. And there are several empty rows separating each query.
Everything in the query is, including the title, in column A.

I want to make a button that will select and copy the query. I have recorded
a macro that will work just fine. I just need to know what to do to turn a
cell into a button, since the macro should do the rest.

What event do I need to trap? And what object to I put that event handler
in?

Also, once I figure that out, I need to know how to add that event handler
to the sheet as I build the queries.

My thinking is:

Add the query label
move over three cells and Add the button
move back three cells and down one row and Build the query

Then do the same thing again for the next three queries.

I know I got kind of wordy here, but I hope someone can point me in the
right direction.

Thanks,
Ken Loomis







 
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
make a cell into a button RGlade Excel Discussion (Misc queries) 1 January 28th 08 07:35 PM
use "button" to make calculation ignore a cell Excel Worksheet Functions 5 March 21st 06 04:54 PM
How to make a button conditional Jan V. Excel Programming 2 April 27th 04 11:53 PM
make button - assign to cell tegger Excel Programming 3 November 6th 03 11:39 AM
Make a cell into a Macro button Al[_4_] Excel Programming 5 November 5th 03 10:15 AM


All times are GMT +1. The time now is 10:38 PM.

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

About Us

"It's about Microsoft Excel"