Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #107944

Re: User Selection as to which Function to Run

From "JCO" <someone@somewhere.com>
Newsgroups microsoft.public.excel.programming
Subject Re: User Selection as to which Function to Run
Date 2015-08-08 16:26 -0500
Organization Aioe.org NNTP Server
Message-ID <mq5s5p$f75$1@speranza.aioe.org> (permalink)
References <mq2u0f$43i$2@speranza.aioe.org> <mq2vkm$jd4$1@dont-email.me>

Show all headers | View raw


"Claus Busch"  wrote in message news:mq2vkm$jd4$1@dont-email.me...

Hi,

Am Fri, 7 Aug 2015 13:39:13 -0500 schrieb JCO:

> I suspect I get the selection up front, maybe dropdown list if that is
> possible, then that code executes on the selection.  That would be nice if
> possible.

your numbers in column A, the validation list in B1.
First select the expected function

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) <> "B1" Then Exit Sub
Dim myRng As Range

On Error Resume Next
Set myRng = Application.InputBox("Select your range", "Selection",
Type:=8)
If myRng Is Nothing Then Exit Sub

Range("C1") = "=" & Target & "(" & myRng.Address & ")"
End Sub

The result is written to C1


Regards
Claus B.
-- 
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

Thanks Claus
Is there anyway to not define the control on the sheet.  I was just thinking 
to create the dropdown as a popup type then after capturing the input, 
destroy the dropdown.

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

User Selection as to which Function to Run "JCO" <someone@somewhere.com> - 2015-08-07 13:39 -0500
  Re: User Selection as to which Function to Run Claus Busch <claus_busch@t-online.de> - 2015-08-07 21:08 +0200
    Re: User Selection as to which Function to Run "JCO" <someone@somewhere.com> - 2015-08-08 16:26 -0500
  Re: User Selection as to which Function to Run Claus Busch <claus_busch@t-online.de> - 2015-08-09 19:07 +0200
    Re: User Selection as to which Function to Run "JCO" <someone@somewhere.com> - 2015-08-13 14:31 -0500
      Re: User Selection as to which Function to Run GS <gs@v.invalid> - 2015-08-13 20:23 -0400
        Re: User Selection as to which Function to Run "JCO" <someone@somewhere.com> - 2015-08-18 18:05 -0500
          Re: User Selection as to which Function to Run GS <gs@v.invalid> - 2015-08-18 19:54 -0400

csiph-web