Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Date for ToggleHeadings macro

Is there a way to start this macro by it self for the whole mont of april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Date for ToggleHeadings macro

So you want the Headings to continually toggle on and off for a whole
month?
Won't that be a bit irritating?

I'm sure that's not what you mean, but perhaps you'd like to restate
your question....
Tim.


"Antonyo" wrote in message
...
Is there a way to start this macro by it self for the whole mont of
april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Date for ToggleHeadings macro

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo


"Dave Peterson" escribió en el mensaje
...
If you name the macro auto_open, it'll run when you open the workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole mont of

april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Date for ToggleHeadings macro

You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show those headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el mensaje
...
If you name the macro auto_open, it'll run when you open the workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole mont of

april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Date for ToggleHeadings macro

Hello Again

I have 12 Sheets named -
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
Regards
Antonyo



"Dave Peterson" escribió en el mensaje
...
You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show those

headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el mensaje
...
If you name the macro auto_open, it'll run when you open the workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole mont of

april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub

--

Dave Peterson


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Date for ToggleHeadings macro

They're named ",1", ",2", ..., ",12"????

That looks highly unusual to me.

Are they named "sheet 1" (with a space), "sheet1" (no space) or just "1" (no
sheet)?



Antonyo wrote:

Hello Again

I have 12 Sheets named -
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show those

headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el mensaje
...
If you name the macro auto_open, it'll run when you open the workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole mont of
april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Date for ToggleHeadings macro

Hello Again

Can You take a look to this link?
This is part of the WorkBook

http://www.geocities.com/antonioata/Furniture.xls


Regards
Antonyo



"Dave Peterson" escribió en el mensaje
...
They're named ",1", ",2", ..., ",12"????

That looks highly unusual to me.

Are they named "sheet 1" (with a space), "sheet1" (no space) or just "1"

(no
sheet)?



Antonyo wrote:

Hello Again

I have 12 Sheets named -
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show

those
headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el mensaje
...
If you name the macro auto_open, it'll run when you open the

workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole mont

of
april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Date for ToggleHeadings macro

I don't open other workbooks.

You may want to explain in plain text.

Antonyo wrote:

Hello Again

Can You take a look to this link?
This is part of the WorkBook

http://www.geocities.com/antonioata/Furniture.xls

Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
They're named ",1", ",2", ..., ",12"????

That looks highly unusual to me.

Are they named "sheet 1" (with a space), "sheet1" (no space) or just "1"

(no
sheet)?



Antonyo wrote:

Hello Again

I have 12 Sheets named -
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show

those
headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el mensaje
...
If you name the macro auto_open, it'll run when you open the

workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole mont

of
april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Date for ToggleHeadings macro

Hello Dave

On the VBAProject shows

VBAProject(Furniture.xls)
-Microsoft Excel Objects

Sheet(1),1
Sheet(2),2
Sheet(3),3
Sheet(4),4
Sheet(5),5
Sheet(6),6
Sheet(7),7
Sheet(8),8
Sheet(9),9
Sheet(10),10
Sheet(11),11
Sheet(12),12
ThisWorkbook

I made this workbook on HTML if you like to take a look of it
If not is Ok I understand

http://www.geocities.com/antonioata/Excel/Furniture.htm

Regards
Antonyo


"Dave Peterson" escribió en el mensaje
...
I don't open other workbooks.

You may want to explain in plain text.

Antonyo wrote:

Hello Again

Can You take a look to this link?
This is part of the WorkBook

http://www.geocities.com/antonioata/Furniture.xls

Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
They're named ",1", ",2", ..., ",12"????

That looks highly unusual to me.

Are they named "sheet 1" (with a space), "sheet1" (no space) or just

"1"
(no
sheet)?



Antonyo wrote:

Hello Again

I have 12 Sheets named -
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show

those
headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el

mensaje
...
If you name the macro auto_open, it'll run when you open the

workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole

mont
of
april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub

--

Dave Peterson

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Date for ToggleHeadings macro

I bet that the codenames (first in that list) didn't really have the ()'s in
them.

More like:
Sheet1 (1)
Sheet2 (2)
Sheet3 (3)
....
Sheet12 (12)

Maybe this one:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "m")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub





Antonyo wrote:

Hello Dave

On the VBAProject shows

VBAProject(Furniture.xls)
-Microsoft Excel Objects

Sheet(1),1
Sheet(2),2
Sheet(3),3
Sheet(4),4
Sheet(5),5
Sheet(6),6
Sheet(7),7
Sheet(8),8
Sheet(9),9
Sheet(10),10
Sheet(11),11
Sheet(12),12
ThisWorkbook

I made this workbook on HTML if you like to take a look of it
If not is Ok I understand

http://www.geocities.com/antonioata/Excel/Furniture.htm

Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
I don't open other workbooks.

You may want to explain in plain text.

Antonyo wrote:

Hello Again

Can You take a look to this link?
This is part of the WorkBook

http://www.geocities.com/antonioata/Furniture.xls

Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
They're named ",1", ",2", ..., ",12"????

That looks highly unusual to me.

Are they named "sheet 1" (with a space), "sheet1" (no space) or just

"1"
(no
sheet)?



Antonyo wrote:

Hello Again

I have 12 Sheets named -
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
Regards
Antonyo

"Dave Peterson" escribió en el mensaje
...
You have 12 sheets named: Jan, Feb, Mar, ..., Dec?

If yes, then how about something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim CurMonth As String

CurMonth = Format(Date, "mmm")

For Each wks In ThisWorkbook.Worksheets
With wks
.Select
ActiveWindow.DisplayHeadings _
= CBool((LCase(.Name) = LCase(CurMonth)))
End With
Next wks

End Sub

Although I do agree with Tim. The first thing I would do is show
those
headers.


Antonyo wrote:

I Have 12 sheets, one for every month of the year
Jan is Sheet 1,Feb Is Sheet 2 and so on
I need the Headings to show on march (Sheet 3 ) if is march
if is April (Sheet 4) I need march off and April on
Is this Possible

Antonyo

"Dave Peterson" escribió en el

mensaje
...
If you name the macro auto_open, it'll run when you open the
workbook.

Then you can check the date to see if it should continue:

Sub auto_open()
if format(date,"mmyyyy") = "042005" then
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
else
'do nothing
end if
End Sub

Antonyo wrote:

Is there a way to start this macro by it self for the whole

mont
of
april
2005?

Thanks in advance

Sub ToggleHeadings()
ActiveWindow.DisplayHeadings = Not _
ActiveWindow.DisplayHeadings
End Sub

--

Dave Peterson

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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 Insert Current Date into cell - Macro to "Save As" Guy[_2_] Excel Worksheet Functions 4 December 12th 08 08:20 PM
Date Macro in_trouble Excel Discussion (Misc queries) 2 March 28th 07 03:06 AM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Date macro james Excel Programming 3 April 23rd 04 04:27 PM
A macro for the today's date...not the current date abxy[_18_] Excel Programming 7 February 8th 04 11:05 PM


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