ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Use a static set of data for input into a macro (https://www.excelbanter.com/excel-discussion-misc-queries/77728-use-static-set-data-input-into-macro.html)

cdb

Use a static set of data for input into a macro
 
I have a macro designed to move a sheet to a different workbook dependant on
who the adviser is. At the moment I have this looking at a certain cell in a
workbook. What I would really like is when the macro is set off an input box
pops up and gives the options of adviser names to choose from.

If this possible, and if so how?

Cheers,

cdb

Ardus Petus

Use a static set of data for input into a macro
 
dim adviser as string
.....
adviser = Inputbox "Enter Adviser's name"

HTH
--
AP

"cdb" a écrit dans le message de
...
I have a macro designed to move a sheet to a different workbook dependant

on
who the adviser is. At the moment I have this looking at a certain cell in

a
workbook. What I would really like is when the macro is set off an input

box
pops up and gives the options of adviser names to choose from.

If this possible, and if so how?

Cheers,

cdb




cdb

Use a static set of data for input into a macro
 
Cheers, but this is not quite what I need. I'm going to have, say, 5 advisers
and I only want one of those 5 names to be entered as a selection and I don't
think the code you've supplied will do that.

For example, my advisers are Jo, John, Jim, Jeff and Jerry
Each of the workbooks I want to copy the sheet to has the advisers name in
it, which is why I only want to have these 5 as the input options.

So what I require is a list of options to choose from with my input box
(whether it be a drop down box, tick box etc, but I want the 5 names visible
and a way to select one of them only)

"Ardus Petus" wrote:

dim adviser as string
.....
adviser = Inputbox "Enter Adviser's name"

HTH
--
AP

"cdb" a écrit dans le message de
...
I have a macro designed to move a sheet to a different workbook dependant

on
who the adviser is. At the moment I have this looking at a certain cell in

a
workbook. What I would really like is when the macro is set off an input

box
pops up and gives the options of adviser names to choose from.

If this possible, and if so how?

Cheers,

cdb






All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com