New Sheet Macro Name Creator

  • Thread starter Thread starter HoundofCullin
  • Start date Start date
H

HoundofCullin

I'm working on a log of sorts that will constantly be gaining ne
sheets. All the sheets (when blank) are based on a hidden sheet calle
(in all my cleverness) BlankSheet.
I have set up a small form on the main sheet (really it's only a singl
cell and a button to activate the macro) so that I enter the name int
the cell, click the button and it runs a macro that unhides BlankSheet
copies it to the end (the end result is titled -BlankSheet (2)- ) th
macro then copies the Value from the designated cell (cell C1 in m
sheet) and pastes it as the name of the new sheet (the one title
-BlankSheet (2)- if you remember).

Now... it's been going fairly smoothly EXCEPT I can't get the macro t
paste the VALUE of the cell. When I run the created macro it pastes th
value that was there when I created the macro. Which causes a proble
because if I run the macro once I get a new sheet titled -390- when
run it again it tells me I can't have multiple sheets of the same name
Can anyone tell me how to fix this minor problem
 
You can incorporate this code into your macro after the line that actually creates the new sheet--it was passed to me by someone posting as dcronje. What it does is bring an input box up in which you type the name of the new sheet. All you have to do is type the name and press enter
By the way, as far as I know, you can't use the macro recorder to cop a cell to name a new sheet

t

Dim wsActive As Workshee
Dim iptResult As Strin

Set wsActive = ActiveShee
iptResult = InputBox("Type name of sheet"

wsActive.Name = iptResul
 
Back
Top