Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Rehide Sheet in macro.

I have the following macro
Sub testa()
'
' testa Macro
' Macro recorded 3/29/2006 by Chuck F.
'

'
Sheets("Nationals Import Sheet").Visible = True
Sheets("Nationals Import Sheet").Select
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:A").EntireColumn.AutoFit
Cells.Select
Cells.EntireColumn.AutoFit
Range("T2").Select

Basically it unhides a sheet called "Nationals Import Sheet" and copies
the data into a new workbook.

What I can't figure out is how to have the macro go back into the
orgional sheet, and rehide that tab.

Any help would be great!!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gazeta
 
Posts: n/a
Default Rehide Sheet in macro.


Uzytkownik "ChuckF" napisal w wiadomosci
oups.com...
I have the following macro
Sub testa()
'
' testa Macro
' Macro recorded 3/29/2006 by Chuck F.
'

'
Sheets("Nationals Import Sheet").Visible = True
Sheets("Nationals Import Sheet").Select
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:A").EntireColumn.AutoFit
Cells.Select
Cells.EntireColumn.AutoFit
Range("T2").Select

Basically it unhides a sheet called "Nationals Import Sheet" and copies
the data into a new workbook.

What I can't figure out is how to have the macro go back into the
orgional sheet, and rehide that tab.

Any help would be great!!

try
workbook("your name").Sheets("Nationals Import Sheet").Visible = false
or
activewindow.activatenext
Sheets("Nationals Import Sheet").Visible = false
mcg


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Alan
 
Posts: n/a
Default Rehide Sheet in macro.

Try this (untested)
Regards,
Alan.

Sheets("Nationals Import Sheet").Visible = True
Sheets("Nationals Import Sheet").Select
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Nationals Import Sheet").Visible = False
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:A").EntireColumn.AutoFit
Cells.Select
Cells.EntireColumn.AutoFit
Range("T2").Select

"ChuckF" wrote in message
oups.com...
I have the following macro
Sub testa()
'
' testa Macro
' Macro recorded 3/29/2006 by Chuck F.
'

'
Sheets("Nationals Import Sheet").Visible = True
Sheets("Nationals Import Sheet").Select
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:A").EntireColumn.AutoFit
Cells.Select
Cells.EntireColumn.AutoFit
Range("T2").Select

Basically it unhides a sheet called "Nationals Import Sheet" and copies
the data into a new workbook.

What I can't figure out is how to have the macro go back into the
orgional sheet, and rehide that tab.

Any help would be great!!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Rehide Sheet in macro.

Perfect...thanks SO much.

Reply
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
macro to extract data of a selected sheet TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 February 27th 06 06:47 AM
use macro button to run macro in protected sheet earl Excel Discussion (Misc queries) 3 February 26th 06 10:21 PM
How can you create a macro on a protected sheet? Felix Excel Discussion (Misc queries) 2 February 23rd 06 12:37 AM
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM


All times are GMT +1. The time now is 09:54 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"