PDA

View Full Version : Userform_Activate



Daxton A.
11-25-2012, 07:59 AM
The problem I am having is that I currently have a Table of Contents Page that has a listbox of all the current worksheets in the workbook. I am creating a "New" worksheet function that inserts a new worksheet.

I have some knowledge but very little. I have the Userform_Activate() downpat but I am not sure how to reactivate the userform with its new index that has been inserted.

Bob Phillips
11-25-2012, 12:54 PM
Where is this listbox, which sheet?

Daxton A.
11-25-2012, 01:44 PM
frmCurrentSheet or Ctrl + Shift + F

Bob Phillips
11-25-2012, 04:21 PM
Apart from the fact that it errors when you click Insert Sheet, should it show the frmSheetname and then the user types in the sheet name they want to add? If so, what is that Userform Deactivate supposed to be doing, and why not give a list of all sheets in the workbook that aren't already listed, rather than type it in?

Daxton A.
11-25-2012, 05:42 PM
This is what is in my head. (i.e. what I am wanting)

Step 1: Ctrl + Shift + F
Step 2: The Userform activates pulling all the names of the worksheets.
(just for readability)
Step 3: They can then Delete or Insert Sheets without leaving the form.
Step 4: Insert: Pulls up a new userform with a textbox for 31 characters allowed. The user
inputs the new sheet name. Then it gets placed alphabetically in the workbook and
the listbox gets cleared and the worksheet names get renamed in the pool.

You can delete the Deactivate module please. I was trying to figure it out, forgot that i did not delete it.

(I am always learning new things, which that can be really horrible, lol. Being that I cant keep up with the things that I've learned!) That is my explanation for the useless info being there. I have not cleaned it up yet.


Apart from the fact that it errors when you click Insert Sheet, should it show the frmSheetname and then the user types in the sheet name they want to add? If so, what is that Userform Deactivate supposed to be doing, and why not give a list of all sheets in the workbook that aren't already listed, rather than type it in?

Daxton A.
11-27-2012, 05:21 AM
Hope this helps!