Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Dynamic button creation

Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Dynamic button creation

Why not just one button?
Sub ButtonMacro()
Call mulby(ActiveCell.Value)
End Sub

HTH

Die_Another_Day
mazzarin wrote:
Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Dynamic button creation

Due to the way the spreadsheet is organized and what the function mulby
does, it needs to be seperate buttons for every value given.


Die_Another_Day wrote:
Why not just one button?
Sub ButtonMacro()
Call mulby(ActiveCell.Value)
End Sub

HTH

Die_Another_Day
mazzarin wrote:
Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Dynamic button creation

Just to elaborate, I originally had one button, but when I submitted it
for review, people generally didn't like how that worked... they wanted
multiple buttons so they didn't have to think/type. This is the best
implementation I can think of for what was requested.


mazzarin wrote:
Due to the way the spreadsheet is organized and what the function mulby
does, it needs to be seperate buttons for every value given.


Die_Another_Day wrote:
Why not just one button?
Sub ButtonMacro()
Call mulby(ActiveCell.Value)
End Sub

HTH

Die_Another_Day
mazzarin wrote:
Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Dynamic button creation

What about using the before double-click event? Then all your lazy
users have to do is double click the cell they want.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Not Intersect(Target, Range("L15:L21")) Is Nothing Then
If Target.Value < "" Then
Call Mulby(Target.Value)
End If
End If
End Sub

if that doesn't work let me know when you want to create the buttons
and I will help you write the code.

Die_Another_Day
mazzarin wrote:
Just to elaborate, I originally had one button, but when I submitted it
for review, people generally didn't like how that worked... they wanted
multiple buttons so they didn't have to think/type. This is the best
implementation I can think of for what was requested.


mazzarin wrote:
Due to the way the spreadsheet is organized and what the function mulby
does, it needs to be seperate buttons for every value given.


Die_Another_Day wrote:
Why not just one button?
Sub ButtonMacro()
Call mulby(ActiveCell.Value)
End Sub

HTH

Die_Another_Day
mazzarin wrote:
Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Dynamic button creation

That works! Hopefully everything goes well now.

Thanks.

Die_Another_Day wrote:
What about using the before double-click event? Then all your lazy
users have to do is double click the cell they want.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Not Intersect(Target, Range("L15:L21")) Is Nothing Then
If Target.Value < "" Then
Call Mulby(Target.Value)
End If
End If
End Sub

if that doesn't work let me know when you want to create the buttons
and I will help you write the code.

Die_Another_Day
mazzarin wrote:
Just to elaborate, I originally had one button, but when I submitted it
for review, people generally didn't like how that worked... they wanted
multiple buttons so they didn't have to think/type. This is the best
implementation I can think of for what was requested.


mazzarin wrote:
Due to the way the spreadsheet is organized and what the function mulby
does, it needs to be seperate buttons for every value given.


Die_Another_Day wrote:
Why not just one button?
Sub ButtonMacro()
Call mulby(ActiveCell.Value)
End Sub

HTH

Die_Another_Day
mazzarin wrote:
Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Dynamic button creation

That works! Hopefully everything goes well now.

Thanks.

Die_Another_Day wrote:
What about using the before double-click event? Then all your lazy
users have to do is double click the cell they want.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Not Intersect(Target, Range("L15:L21")) Is Nothing Then
If Target.Value < "" Then
Call Mulby(Target.Value)
End If
End If
End Sub

if that doesn't work let me know when you want to create the buttons
and I will help you write the code.

Die_Another_Day
mazzarin wrote:
Just to elaborate, I originally had one button, but when I submitted it
for review, people generally didn't like how that worked... they wanted
multiple buttons so they didn't have to think/type. This is the best
implementation I can think of for what was requested.


mazzarin wrote:
Due to the way the spreadsheet is organized and what the function mulby
does, it needs to be seperate buttons for every value given.


Die_Another_Day wrote:
Why not just one button?
Sub ButtonMacro()
Call mulby(ActiveCell.Value)
End Sub

HTH

Die_Another_Day
mazzarin wrote:
Hi,

I have a column of numbers in an excel sheet. They can be any set of
numbers, but only within the range L15:L21

Is it possible, for every non-empty cell (maybe on error resume next?),
to create a button on top of the cell with the caption set as the
number IN the cell, and for it to call a script mulby(cell.value here)

Thanks for any assistance.


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
Dynamic creation, or something different needed? Nehvun Excel Worksheet Functions 0 July 31st 07 06:12 AM
Dynamic Formula Creation?? [email protected] Excel Discussion (Misc queries) 2 October 27th 06 09:14 AM
ASP Dynamic Excel Creation Chris Oswald Excel Programming 0 November 9th 04 05:27 PM
Dynamic Control Creation in VBA Asif[_3_] Excel Programming 2 December 9th 03 07:35 PM
Dynamic Creation of borders Tyrusst Excel Programming 1 October 15th 03 12:47 PM


All times are GMT +1. The time now is 06:43 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"