Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to run code on hidden sheets, without unhiding and hiding back
the sheet in the process? I have the following code Sheets("Tracker").Select Range("B3").Select Selection.Font.ColorIndex = 4 Range("C3").Select ActiveCell.FormulaR1C1 = "=NOW()" Range("C3").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False I want the sheet 'Tracker' to be hidden always (even password protected), so the code Sheets("Tracker").Select will break down because there will be no sheet to select. Is it possible I can run the above code with the sheet 'Tracker' hidden? Thanks in advance, Pinda. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The hidden is easy, don't select it
With Sheets("Tracker") .Range("B3").Font.ColorIndex = 4 .Range("C3").VAlue = Now Range("C3").Numberformat = "d mmm yyyy hh:mm:ss" End with Ptrotectiuon will need to be removed and re-instated afterwards. -- HTH RP (remove nothere from the email address if mailing direct) "Pinda" wrote in message ... Is it possible to run code on hidden sheets, without unhiding and hiding back the sheet in the process? I have the following code Sheets("Tracker").Select Range("B3").Select Selection.Font.ColorIndex = 4 Range("C3").Select ActiveCell.FormulaR1C1 = "=NOW()" Range("C3").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False I want the sheet 'Tracker' to be hidden always (even password protected), so the code Sheets("Tracker").Select will break down because there will be no sheet to select. Is it possible I can run the above code with the sheet 'Tracker' hidden? Thanks in advance, Pinda. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Don/Bob, thats works like a charm. I have implemented the changes in
all my similar code, but am having trouble with the code below, which is a bit more complex: Sheets("JobSummary").Select Rows("4:4").Select Selection.Copy Rows("6:6").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Rows("6:6").Select Application.CutCopyMode = False Selection.Cut Workbooks.Open Filename:="c:\Manpower\All Adverts\" & _ Sheets("JobSheet").Range("M6") & "\" & Sheets("JobSheet").Range("M5") _ & "\" & "tracker_" & Sheets("JobSheet").Range("M7") & ".xls" Rows("4:4").Select Selection.Insert Shift:=xlDown Application.CutCopyMode = False Rows("5:5").Select Selection.Copy Rows("4:4").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Range("C5").Select Application.CutCopyMode = False ActiveWorkbook.Save ActiveWorkbook.Close Again, I want the sheets Tracker and JobSummary to be hidden and the above code to work. Thanks again guys Pinda "Bob Phillips" wrote: The hidden is easy, don't select it With Sheets("Tracker") .Range("B3").Font.ColorIndex = 4 .Range("C3").VAlue = Now Range("C3").Numberformat = "d mmm yyyy hh:mm:ss" End with Ptrotectiuon will need to be removed and re-instated afterwards. -- HTH RP (remove nothere from the email address if mailing direct) "Pinda" wrote in message ... Is it possible to run code on hidden sheets, without unhiding and hiding back the sheet in the process? I have the following code Sheets("Tracker").Select Range("B3").Select Selection.Font.ColorIndex = 4 Range("C3").Select ActiveCell.FormulaR1C1 = "=NOW()" Range("C3").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False I want the sheet 'Tracker' to be hidden always (even password protected), so the code Sheets("Tracker").Select will break down because there will be no sheet to select. Is it possible I can run the above code with the sheet 'Tracker' hidden? Thanks in advance, Pinda. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro running against hidden worksheet | Excel Discussion (Misc queries) | |||
Formula or Code to keep Hidden Rows Hidden | Excel Worksheet Functions | |||
Running a Macro from hidden Workbook | Excel Programming | |||
Code for Printing Hidden Sheets | Excel Programming | |||
running macros on hidden sheets? | Excel Programming |