ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro control question (https://www.excelbanter.com/excel-programming/423312-macro-control-question.html)

John

Macro control question
 
I want to place a button or some similar form control on my initial summary
worksheet that calls a macro to insert and populate a worksheet just prior to
another worksheet of the users choice in the workbook. My macro works fine
when I execute it while I have the successor worksheet selected.

Is there a macro form I can use that allows me to instruct the user to
select form a list of worksheets to input to the macro execution?

Alternatively, is there a VB function like InputBox that I can use to
present the user with instructions and a selection list of all the
worksheets, so he can specify where to place the new work sheet?

I appreciate your help, -John

Dave Peterson

Macro control question
 
You could build your own userform that contains a combobox or a listbox that
lists all the sheets in the workbook. Then have the user select a sheet name
first.

Debra Dalgleish shares some tips for building userforms he
http://contextures.com/xlUserForm01.html

John wrote:

I want to place a button or some similar form control on my initial summary
worksheet that calls a macro to insert and populate a worksheet just prior to
another worksheet of the users choice in the workbook. My macro works fine
when I execute it while I have the successor worksheet selected.

Is there a macro form I can use that allows me to instruct the user to
select form a list of worksheets to input to the macro execution?

Alternatively, is there a VB function like InputBox that I can use to
present the user with instructions and a selection list of all the
worksheets, so he can specify where to place the new work sheet?

I appreciate your help, -John


--

Dave Peterson


All times are GMT +1. The time now is 07:30 AM.

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