Vba= Copy hidden sheet to a new workbook

SimbadS

New Member
Joined
Feb 13, 2020
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Hi!
I have a problem that i cant solve correct.

I want to use VBA to:
Unhide a very hidden sheet, copy that sheet to a new workbook and hide sheet again in originally workbook.
Also in the process i want to kill formulas in the NEW sheet because there is some tekst/numbers that need to stay as is in originally sheet/woorkbook.
Also if possible name the new woorkbook as example A1 in the sheet`?

Here is what i have so far and im strugling now with the "hide" process:

VBA Code:
Sub copy_Hide_Sheet()
   Dim Ary As Variant
   Dim Ws As Worksheet
   Dim i As Long
   
   ReDim Ary(1 To Worksheets.Count)
   Sheets("Sheeteksample").Visible = True
   
   For Each Ws In Worksheets
   
   Next Ws
   
   Sheets("Sheeteksample").Copy
   Sheets("Sheeteksample").Visible = False
   For Each Ws In Worksheets
   
      With Ws.UsedRange
         .Value = .Value
      End With

   Next Ws

   

End Sub

Thanks!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
How about
VBA Code:
Sub SimbadS()
   Dim Ws As Worksheet
   
   Set Ws = Sheets("Sheeteksample")
   Ws.Visible = xlSheetVisible
   Ws.Copy
   With ActiveSheet.UsedRange
      .Value = .Value
   End With
   Ws.Visible = xlSheetVeryHidden
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,493
Messages
6,125,131
Members
449,206
Latest member
burgsrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top