Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Running code on hidden sheets (revisited)

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


Without selecting, try this on your hidden sheet. Of course the subject
cells would have to be unprotected for a protected sheet. If you really
don't want others to UNhide your sheet, hide/unhide with code using

sheets("tracker").visible=xlveryhidden 'true

with Sheets("Tracker")
... Range("B3").Font.ColorIndex = 4
... Range("C3")=date & time
end with
--
Don Guillett
SalesAid Software



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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Running code on hidden sheets (revisited)

Why not explain what you are actually trying to do

--
Regards,
Tom Ogilvy

"Pinda" wrote in message
...
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


Without selecting, try this on your hidden sheet. Of course the subject
cells would have to be unprotected for a protected sheet. If you really
don't want others to UNhide your sheet, hide/unhide with code using

sheets("tracker").visible=xlveryhidden 'true

with Sheets("Tracker")
.. Range("B3").Font.ColorIndex = 4
.. Range("C3")=date & time
end with
--
Don Guillett
SalesAid Software



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.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Running code on hidden sheets (revisited)

Hi,

The code below runs when the sheet ("JobSummary") is visible, how do I
ammend the code so it runs when JobSummary is hidden?

Thanks,

Pinda

"Tom Ogilvy" wrote:

Why not explain what you are actually trying to do

--
Regards,
Tom Ogilvy

"Pinda" wrote in message
...
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


Without selecting, try this on your hidden sheet. Of course the subject
cells would have to be unprotected for a protected sheet. If you really
don't want others to UNhide your sheet, hide/unhide with code using

sheets("tracker").visible=xlveryhidden 'true

with Sheets("Tracker")
.. Range("B3").Font.ColorIndex = 4
.. Range("C3")=date & time
end with
--
Don Guillett
SalesAid Software



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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Running code on hidden sheets (revisited)

I doubt anyone is going to try to decipher your verbose recorder code to
figure out what you are trying to do. If you continue to be unwilling to
state what you are doing, then I am not sure you will get answer.

Its up to you.

--
Regards,
Tom Ogilvy


"Pinda" wrote in message
...
Hi,

The code below runs when the sheet ("JobSummary") is visible, how do I
ammend the code so it runs when JobSummary is hidden?

Thanks,

Pinda

"Tom Ogilvy" wrote:

Why not explain what you are actually trying to do

--
Regards,
Tom Ogilvy

"Pinda" wrote in message
...
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


Without selecting, try this on your hidden sheet. Of course the

subject
cells would have to be unprotected for a protected sheet. If you

really
don't want others to UNhide your sheet, hide/unhide with code using

sheets("tracker").visible=xlveryhidden 'true

with Sheets("Tracker")
.. Range("B3").Font.ColorIndex = 4
.. Range("C3")=date & time
end with
--
Don Guillett
SalesAid Software



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.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Running code on hidden sheets (revisited)

You didn't take any notice of the advice that Don and I gave you about not
selecting on that sheet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pinda" wrote in message
...
Hi,

The code below runs when the sheet ("JobSummary") is visible, how do I
ammend the code so it runs when JobSummary is hidden?

Thanks,

Pinda

"Tom Ogilvy" wrote:

Why not explain what you are actually trying to do

--
Regards,
Tom Ogilvy

"Pinda" wrote in message
...
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


Without selecting, try this on your hidden sheet. Of course the

subject
cells would have to be unprotected for a protected sheet. If you

really
don't want others to UNhide your sheet, hide/unhide with code using

sheets("tracker").visible=xlveryhidden 'true

with Sheets("Tracker")
.. Range("B3").Font.ColorIndex = 4
.. Range("C3")=date & time
end with
--
Don Guillett
SalesAid Software



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
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
Formula or Code to keep Hidden Rows Hidden Carol Excel Worksheet Functions 6 May 1st 07 11:45 PM
Running code on hidden sheets Pinda[_2_] Excel Programming 3 January 31st 05 03:07 PM
hidden rows when running a macro cprema[_2_] Excel Programming 1 November 10th 04 11:45 AM
Code for Printing Hidden Sheets Todd[_7_] Excel Programming 2 December 3rd 03 02:12 PM
running macros on hidden sheets? hammer Excel Programming 1 October 15th 03 10:47 PM


All times are GMT +1. The time now is 05:21 PM.

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

About Us

"It's about Microsoft Excel"