Multi Function Excel Data Form

  • Thread starter Thread starter lykwid
  • Start date Start date
L

lykwid

Hi,

I have a form that adds a name to a defined name list. This list i
already attached to a combo box. I have a few things I would like t
happen once this name has been entered. So, without further ado ;)
here are my questions:

1) Is there a way I can auto-configure the combo box to include the ne
record added to the bottom of the list?

2) To copy an existing worksheet and automatically replace word X wit
the new name added via the form.

3) To add the word from the form to all the defined name ranges in th
new worksheet.

If this is possible, it would be quite amazing :)

:confused: :confused: :confused: :confused: :confused
 
So far, all I can manage is for the macro to copy the sheet. I don'
know how to rename it to the value entered in the user data entry form
nor do I know how to replace all the X words to the value entered i
the user data entry form.

Here is the code I have so far:

ActiveWorkbook.Sheets("Activities").Activate

Range("B7").Select

Do

If IsEmpty(ActiveCell) = False Then

ActiveCell.Offset(1, 0).Select

End If

Loop Until IsEmpty(ActiveCell) = True

ActiveCell.Value = txtActivity.Value

Sheets("Aerobics").Select

Sheets("Aerobics").Copy After:=Sheets(4)

Sheets("Aerobics (2)").Select

Sheets("Aerobics (2)").Value = txtActivity

Selection.Replace What:="Aerobics", Replacement:=txtActivity
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False
_
ReplaceFormat:=False

Unload Me


Some of it is probably stupid, I recorded a macro to do what I wante
and tried to edit it.

Another question, is it possible for this line of code:

Sheets("Aerobics").Copy After:=Sheets(4)

To insert the new sheet after the last sheet? As more sheets get added
Sheets(4) won't be the end sheet.

Thanks :
 
Back
Top