LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy hidden sheet and then make copy visible HELP?

HI All,

Now I've Googled (a lot!!) on this and can't find the definitive
answer.

I have a hidden (not very-hidden) worksheet lets call it "Details
(0)". This is a template I want to remain hidden.

Now the reason I called it "Details (0)" is because, when you copy it
(via VBA code on a button), the subsequent sheets become "...(1)" "....
(2)" etc. etc. which are ready for the user to fill in.

I'm having real problems leaving the zero sheet hidden and copying it
and then making the copy visible. I don't want to make the zero sheet
visible, copy it then re-hide it. That's messy. Also I want to leave
Excel to automatically numbers it, rather than me managing the
numbering.

The thing is that I note that whilst you can copy a hidden sheet,
can't then select it to make it visible. Also as Excel has just
created the new sheet and (Iassume) named it, why can't I "get" that
name to make it visible without selecting it (which, as stated, I
can't do anyway).

e.g.

Sub Make_PtMP()

Dim Next_PtMP_PageOBJ As Object

Set Next_PtMP_PageOBJ = Sheets("PtMP (0)").Copy
With Next_PtMP_PageOBJ
.Visible = True
.Move After:=Sheets(1)
End With

End Sub.

.....but this fails on Set Next_PtMP_PageOBJ = Sheets("PtMP (0)").Copy
(more hope than judgement!)

Any thoughts????

ST

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Visible Cells in Sheet with Merged and Hidden Cells rtwiss Excel Discussion (Misc queries) 5 April 25th 23 09:08 AM
Copy a whole Word doc into Excel sheet & keep it all visible? Jackstri Excel Discussion (Misc queries) 1 February 16th 06 01:56 PM
copy to hidden sheet bob Excel Programming 2 July 19th 03 02:33 PM
Need Macro to Copy Visible Cells to New Sheet Tom Ogilvy Excel Programming 0 July 15th 03 04:05 PM
Need Macro to Copy Visible Cells to New Sheet Don Guillett[_4_] Excel Programming 0 July 15th 03 03:56 PM


All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"