macro not working #2

I've been trying to get a macro to work. It is a macro that prints the 
previous week's data on a data sheet.
When I click on the macro, I get the message to enter week number.
When I do that I get this error message. "run-time error 424"
                  object required
when I hit the debug button I get this
Sub PrintOut()
'   ActiveSheet.Unprotect
    Set myWeek = Application.InputBox("Select the week number to print", , , 
, , , , 8)
    Set myRange = Range(myRange.Offset(0, 6), 
myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
    If myRange.Column <> 10 Then
    Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden = True
    End If
    ActiveSheet.PrintPreview
'    ActiveSheet.PrintOut
    Cells.EntireColumn.Hidden = False
    ActiveSheet.Protect
End Sub

Would someone help me get this macro to work? 


0
r.dolan (11)
2/25/2005 9:06:22 PM
excel 39879 articles. 2 followers. Follow

12 Replies
963 Views

Similar Articles

[PageSpeed] 14

Since you never set myRange, your

    Set myRange = Range(myRange.Offset(0, 6)...

throws an error.

What is myRange? Is it the same as myWeek (which you don't do anything 
with)? If so, you'd benefit from putting Option Explicit at the top of 
your module, so that you'd have to Dim each variable, and the compiler 
would have picked up the non-Dim of myRange or myWeek.

In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
 "Tim Dolan" <r.dolan@snet.net> wrote:

> I've been trying to get a macro to work. It is a macro that prints the 
> previous week's data on a data sheet.
> When I click on the macro, I get the message to enter week number.
> When I do that I get this error message. "run-time error 424"
>                   object required
> when I hit the debug button I get this
> Sub PrintOut()
> '   ActiveSheet.Unprotect
>     Set myWeek = Application.InputBox("Select the week number to print", , , 
> , , , , 8)
>     Set myRange = Range(myRange.Offset(0, 6), 
> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>     If myRange.Column <> 10 Then
>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden = True
>     End If
>     ActiveSheet.PrintPreview
> '    ActiveSheet.PrintOut
>     Cells.EntireColumn.Hidden = False
>     ActiveSheet.Protect
> End Sub
> 
> Would someone help me get this macro to work?
0
jemcgimpsey (6723)
2/25/2005 9:36:40 PM
JE,
        Thanks for the reply but.... I don't know enough to understand what 
you said. Do I have to put something into that part that I cut and pasted to 
you?


"JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message 
news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
> Since you never set myRange, your
>
>    Set myRange = Range(myRange.Offset(0, 6)...
>
> throws an error.
>
> What is myRange? Is it the same as myWeek (which you don't do anything
> with)? If so, you'd benefit from putting Option Explicit at the top of
> your module, so that you'd have to Dim each variable, and the compiler
> would have picked up the non-Dim of myRange or myWeek.
>
> In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
> "Tim Dolan" <r.dolan@snet.net> wrote:
>
>> I've been trying to get a macro to work. It is a macro that prints the
>> previous week's data on a data sheet.
>> When I click on the macro, I get the message to enter week number.
>> When I do that I get this error message. "run-time error 424"
>>                   object required
>> when I hit the debug button I get this
>> Sub PrintOut()
>> '   ActiveSheet.Unprotect
>>     Set myWeek = Application.InputBox("Select the week number to print", 
>> , ,
>> , , , , 8)
>>     Set myRange = Range(myRange.Offset(0, 6),
>> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>>     If myRange.Column <> 10 Then
>>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden = True
>>     End If
>>     ActiveSheet.PrintPreview
>> '    ActiveSheet.PrintOut
>>     Cells.EntireColumn.Hidden = False
>>     ActiveSheet.Protect
>> End Sub
>>
>> Would someone help me get this macro to work? 


0
r.dolan (11)
2/26/2005 6:28:33 PM
Try this against a copy of your workbook...

Change this line:
Set myWeek = Application.InputBox(.....
to 
Set myRange = Application.InputBox(.....

If it does what you want when you test it, woohoo.  If not, post back.

Tim Dolan wrote:
> 
> JE,
>         Thanks for the reply but.... I don't know enough to understand what
> you said. Do I have to put something into that part that I cut and pasted to
> you?
> 
> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
> > Since you never set myRange, your
> >
> >    Set myRange = Range(myRange.Offset(0, 6)...
> >
> > throws an error.
> >
> > What is myRange? Is it the same as myWeek (which you don't do anything
> > with)? If so, you'd benefit from putting Option Explicit at the top of
> > your module, so that you'd have to Dim each variable, and the compiler
> > would have picked up the non-Dim of myRange or myWeek.
> >
> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
> > "Tim Dolan" <r.dolan@snet.net> wrote:
> >
> >> I've been trying to get a macro to work. It is a macro that prints the
> >> previous week's data on a data sheet.
> >> When I click on the macro, I get the message to enter week number.
> >> When I do that I get this error message. "run-time error 424"
> >>                   object required
> >> when I hit the debug button I get this
> >> Sub PrintOut()
> >> '   ActiveSheet.Unprotect
> >>     Set myWeek = Application.InputBox("Select the week number to print",
> >> , ,
> >> , , , , 8)
> >>     Set myRange = Range(myRange.Offset(0, 6),
> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
> >>     If myRange.Column <> 10 Then
> >>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden = True
> >>     End If
> >>     ActiveSheet.PrintPreview
> >> '    ActiveSheet.PrintOut
> >>     Cells.EntireColumn.Hidden = False
> >>     ActiveSheet.Protect
> >> End Sub
> >>
> >> Would someone help me get this macro to work?

-- 

Dave Peterson
0
ec357201 (5290)
2/26/2005 11:26:57 PM
Dave,
         It didn't make a difference. BTW the line below the MYweek line had 
an arrow next to it and it was highlighted in yellow.
Does that give and direction?


"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message 
news:422105C1.C418F51F@netscapeXSPAM.com...
> Try this against a copy of your workbook...
>
> Change this line:
> Set myWeek = Application.InputBox(.....
> to
> Set myRange = Application.InputBox(.....
>
> If it does what you want when you test it, woohoo.  If not, post back.
>
> Tim Dolan wrote:
>>
>> JE,
>>         Thanks for the reply but.... I don't know enough to understand 
>> what
>> you said. Do I have to put something into that part that I cut and pasted 
>> to
>> you?
>>
>> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
>> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
>> > Since you never set myRange, your
>> >
>> >    Set myRange = Range(myRange.Offset(0, 6)...
>> >
>> > throws an error.
>> >
>> > What is myRange? Is it the same as myWeek (which you don't do anything
>> > with)? If so, you'd benefit from putting Option Explicit at the top of
>> > your module, so that you'd have to Dim each variable, and the compiler
>> > would have picked up the non-Dim of myRange or myWeek.
>> >
>> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
>> > "Tim Dolan" <r.dolan@snet.net> wrote:
>> >
>> >> I've been trying to get a macro to work. It is a macro that prints the
>> >> previous week's data on a data sheet.
>> >> When I click on the macro, I get the message to enter week number.
>> >> When I do that I get this error message. "run-time error 424"
>> >>                   object required
>> >> when I hit the debug button I get this
>> >> Sub PrintOut()
>> >> '   ActiveSheet.Unprotect
>> >>     Set myWeek = Application.InputBox("Select the week number to 
>> >> print",
>> >> , ,
>> >> , , , , 8)
>> >>     Set myRange = Range(myRange.Offset(0, 6),
>> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>> >>     If myRange.Column <> 10 Then
>> >>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden = 
>> >> True
>> >>     End If
>> >>     ActiveSheet.PrintPreview
>> >> '    ActiveSheet.PrintOut
>> >>     Cells.EntireColumn.Hidden = False
>> >>     ActiveSheet.Protect
>> >> End Sub
>> >>
>> >> Would someone help me get this macro to work?
>
> -- 
>
> Dave Peterson 


0
r.dolan (11)
3/1/2005 3:11:57 AM
I really don't have a guess--so here it is!  (Since I don't know what you want
the macro to do, all I can say is that this compiled ok:

Option Explicit

Sub PrintOut()
    Dim myRange As Range
    
'   ActiveSheet.Unprotect
    Set myRange = Application.InputBox("Select the week number to print", _
                        Type:=8)
    Set myRange = Range(myRange.Offset(0, 6), _
                          myRange.SpecialCells(xlLastCell))
    myRange.EntireColumn.Hidden = True
    If myRange.Column <> 10 Then
        Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden _
                    = True
    End If
    ActiveSheet.PrintPreview
'    ActiveSheet.PrintOut
    Cells.EntireColumn.Hidden = False
    ActiveSheet.Protect
End Sub

(I don't know if it does what you want.)

Tim Dolan wrote:
> 
> Dave,
>          It didn't make a difference. BTW the line below the MYweek line had
> an arrow next to it and it was highlighted in yellow.
> Does that give and direction?
> 
> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> news:422105C1.C418F51F@netscapeXSPAM.com...
> > Try this against a copy of your workbook...
> >
> > Change this line:
> > Set myWeek = Application.InputBox(.....
> > to
> > Set myRange = Application.InputBox(.....
> >
> > If it does what you want when you test it, woohoo.  If not, post back.
> >
> > Tim Dolan wrote:
> >>
> >> JE,
> >>         Thanks for the reply but.... I don't know enough to understand
> >> what
> >> you said. Do I have to put something into that part that I cut and pasted
> >> to
> >> you?
> >>
> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
> >> > Since you never set myRange, your
> >> >
> >> >    Set myRange = Range(myRange.Offset(0, 6)...
> >> >
> >> > throws an error.
> >> >
> >> > What is myRange? Is it the same as myWeek (which you don't do anything
> >> > with)? If so, you'd benefit from putting Option Explicit at the top of
> >> > your module, so that you'd have to Dim each variable, and the compiler
> >> > would have picked up the non-Dim of myRange or myWeek.
> >> >
> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
> >> >
> >> >> I've been trying to get a macro to work. It is a macro that prints the
> >> >> previous week's data on a data sheet.
> >> >> When I click on the macro, I get the message to enter week number.
> >> >> When I do that I get this error message. "run-time error 424"
> >> >>                   object required
> >> >> when I hit the debug button I get this
> >> >> Sub PrintOut()
> >> >> '   ActiveSheet.Unprotect
> >> >>     Set myWeek = Application.InputBox("Select the week number to
> >> >> print",
> >> >> , ,
> >> >> , , , , 8)
> >> >>     Set myRange = Range(myRange.Offset(0, 6),
> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
> >> >>     If myRange.Column <> 10 Then
> >> >>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden =
> >> >> True
> >> >>     End If
> >> >>     ActiveSheet.PrintPreview
> >> >> '    ActiveSheet.PrintOut
> >> >>     Cells.EntireColumn.Hidden = False
> >> >>     ActiveSheet.Protect
> >> >> End Sub
> >> >>
> >> >> Would someone help me get this macro to work?
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
ec357201 (5290)
3/1/2005 3:44:44 AM
Hi Dave,
             I tried to reply to you via  e-mail but I couldn't remove the 
xspam.
I don't mind sending you the whole spread sheet if that will help. Won't 
that help make it easier.?
          The macro permitted me to include the previous weeks stats with 
the summary.
                      Tim fm Ct
"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message 
news:4223E52C.BBA4D28A@netscapeXSPAM.com...
>I really don't have a guess--so here it is!  (Since I don't know what you 
>want
> the macro to do, all I can say is that this compiled ok:
>
> Option Explicit
>
> Sub PrintOut()
>    Dim myRange As Range
>
> '   ActiveSheet.Unprotect
>    Set myRange = Application.InputBox("Select the week number to print", _
>                        Type:=8)
>    Set myRange = Range(myRange.Offset(0, 6), _
>                          myRange.SpecialCells(xlLastCell))
>    myRange.EntireColumn.Hidden = True
>    If myRange.Column <> 10 Then
>        Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden _
>                    = True
>    End If
>    ActiveSheet.PrintPreview
> '    ActiveSheet.PrintOut
>    Cells.EntireColumn.Hidden = False
>    ActiveSheet.Protect
> End Sub
>
> (I don't know if it does what you want.)
>
> Tim Dolan wrote:
>>
>> Dave,
>>          It didn't make a difference. BTW the line below the MYweek line 
>> had
>> an arrow next to it and it was highlighted in yellow.
>> Does that give and direction?
>>
>> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> news:422105C1.C418F51F@netscapeXSPAM.com...
>> > Try this against a copy of your workbook...
>> >
>> > Change this line:
>> > Set myWeek = Application.InputBox(.....
>> > to
>> > Set myRange = Application.InputBox(.....
>> >
>> > If it does what you want when you test it, woohoo.  If not, post back.
>> >
>> > Tim Dolan wrote:
>> >>
>> >> JE,
>> >>         Thanks for the reply but.... I don't know enough to understand
>> >> what
>> >> you said. Do I have to put something into that part that I cut and 
>> >> pasted
>> >> to
>> >> you?
>> >>
>> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
>> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
>> >> > Since you never set myRange, your
>> >> >
>> >> >    Set myRange = Range(myRange.Offset(0, 6)...
>> >> >
>> >> > throws an error.
>> >> >
>> >> > What is myRange? Is it the same as myWeek (which you don't do 
>> >> > anything
>> >> > with)? If so, you'd benefit from putting Option Explicit at the top 
>> >> > of
>> >> > your module, so that you'd have to Dim each variable, and the 
>> >> > compiler
>> >> > would have picked up the non-Dim of myRange or myWeek.
>> >> >
>> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
>> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
>> >> >
>> >> >> I've been trying to get a macro to work. It is a macro that prints 
>> >> >> the
>> >> >> previous week's data on a data sheet.
>> >> >> When I click on the macro, I get the message to enter week number.
>> >> >> When I do that I get this error message. "run-time error 424"
>> >> >>                   object required
>> >> >> when I hit the debug button I get this
>> >> >> Sub PrintOut()
>> >> >> '   ActiveSheet.Unprotect
>> >> >>     Set myWeek = Application.InputBox("Select the week number to
>> >> >> print",
>> >> >> , ,
>> >> >> , , , , 8)
>> >> >>     Set myRange = Range(myRange.Offset(0, 6),
>> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>> >> >>     If myRange.Column <> 10 Then
>> >> >>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden 
>> >> >> =
>> >> >> True
>> >> >>     End If
>> >> >>     ActiveSheet.PrintPreview
>> >> >> '    ActiveSheet.PrintOut
>> >> >>     Cells.EntireColumn.Hidden = False
>> >> >>     ActiveSheet.Protect
>> >> >> End Sub
>> >> >>
>> >> >> Would someone help me get this macro to work?
>> >
>> > --
>> >
>> > Dave Peterson
>
> -- 
>
> Dave Peterson 


0
r.dolan (11)
3/1/2005 3:32:13 PM
I don't like to open workbooks--too many things can go wrong.

And besides, you'd still have to describe what you want the code to do and if
I'm not around, someone else will jump in with a suggestion--so you'll get a
quicker response.

Tim Dolan wrote:
> 
> Hi Dave,
>              I tried to reply to you via  e-mail but I couldn't remove the
> xspam.
> I don't mind sending you the whole spread sheet if that will help. Won't
> that help make it easier.?
>           The macro permitted me to include the previous weeks stats with
> the summary.
>                       Tim fm Ct
> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> news:4223E52C.BBA4D28A@netscapeXSPAM.com...
> >I really don't have a guess--so here it is!  (Since I don't know what you
> >want
> > the macro to do, all I can say is that this compiled ok:
> >
> > Option Explicit
> >
> > Sub PrintOut()
> >    Dim myRange As Range
> >
> > '   ActiveSheet.Unprotect
> >    Set myRange = Application.InputBox("Select the week number to print", _
> >                        Type:=8)
> >    Set myRange = Range(myRange.Offset(0, 6), _
> >                          myRange.SpecialCells(xlLastCell))
> >    myRange.EntireColumn.Hidden = True
> >    If myRange.Column <> 10 Then
> >        Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden _
> >                    = True
> >    End If
> >    ActiveSheet.PrintPreview
> > '    ActiveSheet.PrintOut
> >    Cells.EntireColumn.Hidden = False
> >    ActiveSheet.Protect
> > End Sub
> >
> > (I don't know if it does what you want.)
> >
> > Tim Dolan wrote:
> >>
> >> Dave,
> >>          It didn't make a difference. BTW the line below the MYweek line
> >> had
> >> an arrow next to it and it was highlighted in yellow.
> >> Does that give and direction?
> >>
> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> >> news:422105C1.C418F51F@netscapeXSPAM.com...
> >> > Try this against a copy of your workbook...
> >> >
> >> > Change this line:
> >> > Set myWeek = Application.InputBox(.....
> >> > to
> >> > Set myRange = Application.InputBox(.....
> >> >
> >> > If it does what you want when you test it, woohoo.  If not, post back.
> >> >
> >> > Tim Dolan wrote:
> >> >>
> >> >> JE,
> >> >>         Thanks for the reply but.... I don't know enough to understand
> >> >> what
> >> >> you said. Do I have to put something into that part that I cut and
> >> >> pasted
> >> >> to
> >> >> you?
> >> >>
> >> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
> >> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
> >> >> > Since you never set myRange, your
> >> >> >
> >> >> >    Set myRange = Range(myRange.Offset(0, 6)...
> >> >> >
> >> >> > throws an error.
> >> >> >
> >> >> > What is myRange? Is it the same as myWeek (which you don't do
> >> >> > anything
> >> >> > with)? If so, you'd benefit from putting Option Explicit at the top
> >> >> > of
> >> >> > your module, so that you'd have to Dim each variable, and the
> >> >> > compiler
> >> >> > would have picked up the non-Dim of myRange or myWeek.
> >> >> >
> >> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
> >> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
> >> >> >
> >> >> >> I've been trying to get a macro to work. It is a macro that prints
> >> >> >> the
> >> >> >> previous week's data on a data sheet.
> >> >> >> When I click on the macro, I get the message to enter week number.
> >> >> >> When I do that I get this error message. "run-time error 424"
> >> >> >>                   object required
> >> >> >> when I hit the debug button I get this
> >> >> >> Sub PrintOut()
> >> >> >> '   ActiveSheet.Unprotect
> >> >> >>     Set myWeek = Application.InputBox("Select the week number to
> >> >> >> print",
> >> >> >> , ,
> >> >> >> , , , , 8)
> >> >> >>     Set myRange = Range(myRange.Offset(0, 6),
> >> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
> >> >> >>     If myRange.Column <> 10 Then
> >> >> >>     Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden
> >> >> >> =
> >> >> >> True
> >> >> >>     End If
> >> >> >>     ActiveSheet.PrintPreview
> >> >> >> '    ActiveSheet.PrintOut
> >> >> >>     Cells.EntireColumn.Hidden = False
> >> >> >>     ActiveSheet.Protect
> >> >> >> End Sub
> >> >> >>
> >> >> >> Would someone help me get this macro to work?
> >> >
> >> > --
> >> >
> >> > Dave Peterson
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
ec357201 (5290)
3/1/2005 8:37:24 PM
Dave,
         I have an excel spread sheet, work sheet, data sheet whatever its 
called to keep track of a seniors 8-ball pool league that I run.
        Six teams (five on a team) play each week. Each player plays five 
games. I keep the stats each week and give the players a summary each week.
       Weekly stats consist of #games played, # of balls made, # of games 
won, # of break and runs etc.
      The summary provides the totals and the player averages but it does 
not give them the actual weekly stats.
      The macro that I had gave me the option of printing the previous weeks 
stats or any week that I chose on the same sheet as the summary.
      Also, why the concern over me sending you the work sheet? What can 
happen?
             Tim
PS I don't think anyone else is interested in this, because no one else 
seems to reply.

"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message 
news:4224D284.FE2E7E4F@netscapeXSPAM.com...
>I don't like to open workbooks--too many things can go wrong.
>
> And besides, you'd still have to describe what you want the code to do and 
> if
> I'm not around, someone else will jump in with a suggestion--so you'll get 
> a
> quicker response.
>
> Tim Dolan wrote:
>>
>> Hi Dave,
>>              I tried to reply to you via  e-mail but I couldn't remove 
>> the
>> xspam.
>> I don't mind sending you the whole spread sheet if that will help. Won't
>> that help make it easier.?
>>           The macro permitted me to include the previous weeks stats with
>> the summary.
>>                       Tim fm Ct
>> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> news:4223E52C.BBA4D28A@netscapeXSPAM.com...
>> >I really don't have a guess--so here it is!  (Since I don't know what 
>> >you
>> >want
>> > the macro to do, all I can say is that this compiled ok:
>> >
>> > Option Explicit
>> >
>> > Sub PrintOut()
>> >    Dim myRange As Range
>> >
>> > '   ActiveSheet.Unprotect
>> >    Set myRange = Application.InputBox("Select the week number to 
>> > print", _
>> >                        Type:=8)
>> >    Set myRange = Range(myRange.Offset(0, 6), _
>> >                          myRange.SpecialCells(xlLastCell))
>> >    myRange.EntireColumn.Hidden = True
>> >    If myRange.Column <> 10 Then
>> >        Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden _
>> >                    = True
>> >    End If
>> >    ActiveSheet.PrintPreview
>> > '    ActiveSheet.PrintOut
>> >    Cells.EntireColumn.Hidden = False
>> >    ActiveSheet.Protect
>> > End Sub
>> >
>> > (I don't know if it does what you want.)
>> >
>> > Tim Dolan wrote:
>> >>
>> >> Dave,
>> >>          It didn't make a difference. BTW the line below the MYweek 
>> >> line
>> >> had
>> >> an arrow next to it and it was highlighted in yellow.
>> >> Does that give and direction?
>> >>
>> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> >> news:422105C1.C418F51F@netscapeXSPAM.com...
>> >> > Try this against a copy of your workbook...
>> >> >
>> >> > Change this line:
>> >> > Set myWeek = Application.InputBox(.....
>> >> > to
>> >> > Set myRange = Application.InputBox(.....
>> >> >
>> >> > If it does what you want when you test it, woohoo.  If not, post 
>> >> > back.
>> >> >
>> >> > Tim Dolan wrote:
>> >> >>
>> >> >> JE,
>> >> >>         Thanks for the reply but.... I don't know enough to 
>> >> >> understand
>> >> >> what
>> >> >> you said. Do I have to put something into that part that I cut and
>> >> >> pasted
>> >> >> to
>> >> >> you?
>> >> >>
>> >> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
>> >> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
>> >> >> > Since you never set myRange, your
>> >> >> >
>> >> >> >    Set myRange = Range(myRange.Offset(0, 6)...
>> >> >> >
>> >> >> > throws an error.
>> >> >> >
>> >> >> > What is myRange? Is it the same as myWeek (which you don't do
>> >> >> > anything
>> >> >> > with)? If so, you'd benefit from putting Option Explicit at the 
>> >> >> > top
>> >> >> > of
>> >> >> > your module, so that you'd have to Dim each variable, and the
>> >> >> > compiler
>> >> >> > would have picked up the non-Dim of myRange or myWeek.
>> >> >> >
>> >> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
>> >> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
>> >> >> >
>> >> >> >> I've been trying to get a macro to work. It is a macro that 
>> >> >> >> prints
>> >> >> >> the
>> >> >> >> previous week's data on a data sheet.
>> >> >> >> When I click on the macro, I get the message to enter week 
>> >> >> >> number.
>> >> >> >> When I do that I get this error message. "run-time error 424"
>> >> >> >>                   object required
>> >> >> >> when I hit the debug button I get this
>> >> >> >> Sub PrintOut()
>> >> >> >> '   ActiveSheet.Unprotect
>> >> >> >>     Set myWeek = Application.InputBox("Select the week number to
>> >> >> >> print",
>> >> >> >> , ,
>> >> >> >> , , , , 8)
>> >> >> >>     Set myRange = Range(myRange.Offset(0, 6),
>> >> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>> >> >> >>     If myRange.Column <> 10 Then
>> >> >> >>     Range(myRange.Offset(0, -1), Cells(3, 
>> >> >> >> 10)).EntireColumn.Hidden
>> >> >> >> =
>> >> >> >> True
>> >> >> >>     End If
>> >> >> >>     ActiveSheet.PrintPreview
>> >> >> >> '    ActiveSheet.PrintOut
>> >> >> >>     Cells.EntireColumn.Hidden = False
>> >> >> >>     ActiveSheet.Protect
>> >> >> >> End Sub
>> >> >> >>
>> >> >> >> Would someone help me get this macro to work?
>> >> >
>> >> > --
>> >> >
>> >> > Dave Peterson
>> >
>> > --
>> >
>> > Dave Peterson
>
> -- 
>
> Dave Peterson 


0
r.dolan (11)
3/3/2005 7:03:20 PM
Dave,
         Wow! I just got a "brain storm". I put the summary up on the web 
every week.
Check out www.ctpoolleague.com and click on the "shooters standings".
         Tim fm Ct
"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message 
news:4224D284.FE2E7E4F@netscapeXSPAM.com...
>I don't like to open workbooks--too many things can go wrong.
>
> And besides, you'd still have to describe what you want the code to do and 
> if
> I'm not around, someone else will jump in with a suggestion--so you'll get 
> a
> quicker response.
>
> Tim Dolan wrote:
>>
>> Hi Dave,
>>              I tried to reply to you via  e-mail but I couldn't remove 
>> the
>> xspam.
>> I don't mind sending you the whole spread sheet if that will help. Won't
>> that help make it easier.?
>>           The macro permitted me to include the previous weeks stats with
>> the summary.
>>                       Tim fm Ct
>> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> news:4223E52C.BBA4D28A@netscapeXSPAM.com...
>> >I really don't have a guess--so here it is!  (Since I don't know what 
>> >you
>> >want
>> > the macro to do, all I can say is that this compiled ok:
>> >
>> > Option Explicit
>> >
>> > Sub PrintOut()
>> >    Dim myRange As Range
>> >
>> > '   ActiveSheet.Unprotect
>> >    Set myRange = Application.InputBox("Select the week number to 
>> > print", _
>> >                        Type:=8)
>> >    Set myRange = Range(myRange.Offset(0, 6), _
>> >                          myRange.SpecialCells(xlLastCell))
>> >    myRange.EntireColumn.Hidden = True
>> >    If myRange.Column <> 10 Then
>> >        Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden _
>> >                    = True
>> >    End If
>> >    ActiveSheet.PrintPreview
>> > '    ActiveSheet.PrintOut
>> >    Cells.EntireColumn.Hidden = False
>> >    ActiveSheet.Protect
>> > End Sub
>> >
>> > (I don't know if it does what you want.)
>> >
>> > Tim Dolan wrote:
>> >>
>> >> Dave,
>> >>          It didn't make a difference. BTW the line below the MYweek 
>> >> line
>> >> had
>> >> an arrow next to it and it was highlighted in yellow.
>> >> Does that give and direction?
>> >>
>> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> >> news:422105C1.C418F51F@netscapeXSPAM.com...
>> >> > Try this against a copy of your workbook...
>> >> >
>> >> > Change this line:
>> >> > Set myWeek = Application.InputBox(.....
>> >> > to
>> >> > Set myRange = Application.InputBox(.....
>> >> >
>> >> > If it does what you want when you test it, woohoo.  If not, post 
>> >> > back.
>> >> >
>> >> > Tim Dolan wrote:
>> >> >>
>> >> >> JE,
>> >> >>         Thanks for the reply but.... I don't know enough to 
>> >> >> understand
>> >> >> what
>> >> >> you said. Do I have to put something into that part that I cut and
>> >> >> pasted
>> >> >> to
>> >> >> you?
>> >> >>
>> >> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
>> >> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
>> >> >> > Since you never set myRange, your
>> >> >> >
>> >> >> >    Set myRange = Range(myRange.Offset(0, 6)...
>> >> >> >
>> >> >> > throws an error.
>> >> >> >
>> >> >> > What is myRange? Is it the same as myWeek (which you don't do
>> >> >> > anything
>> >> >> > with)? If so, you'd benefit from putting Option Explicit at the 
>> >> >> > top
>> >> >> > of
>> >> >> > your module, so that you'd have to Dim each variable, and the
>> >> >> > compiler
>> >> >> > would have picked up the non-Dim of myRange or myWeek.
>> >> >> >
>> >> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
>> >> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
>> >> >> >
>> >> >> >> I've been trying to get a macro to work. It is a macro that 
>> >> >> >> prints
>> >> >> >> the
>> >> >> >> previous week's data on a data sheet.
>> >> >> >> When I click on the macro, I get the message to enter week 
>> >> >> >> number.
>> >> >> >> When I do that I get this error message. "run-time error 424"
>> >> >> >>                   object required
>> >> >> >> when I hit the debug button I get this
>> >> >> >> Sub PrintOut()
>> >> >> >> '   ActiveSheet.Unprotect
>> >> >> >>     Set myWeek = Application.InputBox("Select the week number to
>> >> >> >> print",
>> >> >> >> , ,
>> >> >> >> , , , , 8)
>> >> >> >>     Set myRange = Range(myRange.Offset(0, 6),
>> >> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>> >> >> >>     If myRange.Column <> 10 Then
>> >> >> >>     Range(myRange.Offset(0, -1), Cells(3, 
>> >> >> >> 10)).EntireColumn.Hidden
>> >> >> >> =
>> >> >> >> True
>> >> >> >>     End If
>> >> >> >>     ActiveSheet.PrintPreview
>> >> >> >> '    ActiveSheet.PrintOut
>> >> >> >>     Cells.EntireColumn.Hidden = False
>> >> >> >>     ActiveSheet.Protect
>> >> >> >> End Sub
>> >> >> >>
>> >> >> >> Would someone help me get this macro to work?
>> >> >
>> >> > --
>> >> >
>> >> > Dave Peterson
>> >
>> > --
>> >
>> > Dave Peterson
>
> -- 
>
> Dave Peterson 


0
r.dolan (11)
3/3/2005 7:13:40 PM
Workbooks can have macros in them.  Not all macros are written by nice people. 
(Even though yours might not do any damage, it's still my general rule not to
open other people's workbooks.)



Tim Dolan wrote:
> 
> Dave,
>          Wow! I just got a "brain storm". I put the summary up on the web
> every week.
> Check out www.ctpoolleague.com and click on the "shooters standings".
>          Tim fm Ct
> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> news:4224D284.FE2E7E4F@netscapeXSPAM.com...
> >I don't like to open workbooks--too many things can go wrong.
> >
> > And besides, you'd still have to describe what you want the code to do and
> > if
> > I'm not around, someone else will jump in with a suggestion--so you'll get
> > a
> > quicker response.
> >
> > Tim Dolan wrote:
> >>
> >> Hi Dave,
> >>              I tried to reply to you via  e-mail but I couldn't remove
> >> the
> >> xspam.
> >> I don't mind sending you the whole spread sheet if that will help. Won't
> >> that help make it easier.?
> >>           The macro permitted me to include the previous weeks stats with
> >> the summary.
> >>                       Tim fm Ct
> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> >> news:4223E52C.BBA4D28A@netscapeXSPAM.com...
> >> >I really don't have a guess--so here it is!  (Since I don't know what
> >> >you
> >> >want
> >> > the macro to do, all I can say is that this compiled ok:
> >> >
> >> > Option Explicit
> >> >
> >> > Sub PrintOut()
> >> >    Dim myRange As Range
> >> >
> >> > '   ActiveSheet.Unprotect
> >> >    Set myRange = Application.InputBox("Select the week number to
> >> > print", _
> >> >                        Type:=8)
> >> >    Set myRange = Range(myRange.Offset(0, 6), _
> >> >                          myRange.SpecialCells(xlLastCell))
> >> >    myRange.EntireColumn.Hidden = True
> >> >    If myRange.Column <> 10 Then
> >> >        Range(myRange.Offset(0, -1), Cells(3, 10)).EntireColumn.Hidden _
> >> >                    = True
> >> >    End If
> >> >    ActiveSheet.PrintPreview
> >> > '    ActiveSheet.PrintOut
> >> >    Cells.EntireColumn.Hidden = False
> >> >    ActiveSheet.Protect
> >> > End Sub
> >> >
> >> > (I don't know if it does what you want.)
> >> >
> >> > Tim Dolan wrote:
> >> >>
> >> >> Dave,
> >> >>          It didn't make a difference. BTW the line below the MYweek
> >> >> line
> >> >> had
> >> >> an arrow next to it and it was highlighted in yellow.
> >> >> Does that give and direction?
> >> >>
> >> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> >> >> news:422105C1.C418F51F@netscapeXSPAM.com...
> >> >> > Try this against a copy of your workbook...
> >> >> >
> >> >> > Change this line:
> >> >> > Set myWeek = Application.InputBox(.....
> >> >> > to
> >> >> > Set myRange = Application.InputBox(.....
> >> >> >
> >> >> > If it does what you want when you test it, woohoo.  If not, post
> >> >> > back.
> >> >> >
> >> >> > Tim Dolan wrote:
> >> >> >>
> >> >> >> JE,
> >> >> >>         Thanks for the reply but.... I don't know enough to
> >> >> >> understand
> >> >> >> what
> >> >> >> you said. Do I have to put something into that part that I cut and
> >> >> >> pasted
> >> >> >> to
> >> >> >> you?
> >> >> >>
> >> >> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
> >> >> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
> >> >> >> > Since you never set myRange, your
> >> >> >> >
> >> >> >> >    Set myRange = Range(myRange.Offset(0, 6)...
> >> >> >> >
> >> >> >> > throws an error.
> >> >> >> >
> >> >> >> > What is myRange? Is it the same as myWeek (which you don't do
> >> >> >> > anything
> >> >> >> > with)? If so, you'd benefit from putting Option Explicit at the
> >> >> >> > top
> >> >> >> > of
> >> >> >> > your module, so that you'd have to Dim each variable, and the
> >> >> >> > compiler
> >> >> >> > would have picked up the non-Dim of myRange or myWeek.
> >> >> >> >
> >> >> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
> >> >> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
> >> >> >> >
> >> >> >> >> I've been trying to get a macro to work. It is a macro that
> >> >> >> >> prints
> >> >> >> >> the
> >> >> >> >> previous week's data on a data sheet.
> >> >> >> >> When I click on the macro, I get the message to enter week
> >> >> >> >> number.
> >> >> >> >> When I do that I get this error message. "run-time error 424"
> >> >> >> >>                   object required
> >> >> >> >> when I hit the debug button I get this
> >> >> >> >> Sub PrintOut()
> >> >> >> >> '   ActiveSheet.Unprotect
> >> >> >> >>     Set myWeek = Application.InputBox("Select the week number to
> >> >> >> >> print",
> >> >> >> >> , ,
> >> >> >> >> , , , , 8)
> >> >> >> >>     Set myRange = Range(myRange.Offset(0, 6),
> >> >> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
> >> >> >> >>     If myRange.Column <> 10 Then
> >> >> >> >>     Range(myRange.Offset(0, -1), Cells(3,
> >> >> >> >> 10)).EntireColumn.Hidden
> >> >> >> >> =
> >> >> >> >> True
> >> >> >> >>     End If
> >> >> >> >>     ActiveSheet.PrintPreview
> >> >> >> >> '    ActiveSheet.PrintOut
> >> >> >> >>     Cells.EntireColumn.Hidden = False
> >> >> >> >>     ActiveSheet.Protect
> >> >> >> >> End Sub
> >> >> >> >>
> >> >> >> >> Would someone help me get this macro to work?
> >> >> >
> >> >> > --
> >> >> >
> >> >> > Dave Peterson
> >> >
> >> > --
> >> >
> >> > Dave Peterson
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
ec357201 (5290)
3/3/2005 7:57:36 PM
Please help me, if you can.
I had a macro that worked on a spread sheet that I use to keep stats for a 
seniors 8-ball league.
A person helped me with my stats and really made it better. However, the 
macro that I had that allowed me to print previous weeks stats no longer 
works.
I haven't been able to describe the macro very well and  apparently 
worksheets can contain viruses.
Here's my question.
I have Norton Internet Security 2005. How can I make my worksheet safe for 
this NG so I can get your help?
     Thanks in advance,
                                Tim fm CT
"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message 
news:42276C30.24D59D05@netscapeXSPAM.com...
> Workbooks can have macros in them.  Not all macros are written by nice 
> people.
> (Even though yours might not do any damage, it's still my general rule not 
> to
> open other people's workbooks.)
>
>
>
> Tim Dolan wrote:
>>
>> Dave,
>>          Wow! I just got a "brain storm". I put the summary up on the web
>> every week.
>> Check out www.ctpoolleague.com and click on the "shooters standings".
>>          Tim fm Ct
>> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> news:4224D284.FE2E7E4F@netscapeXSPAM.com...
>> >I don't like to open workbooks--too many things can go wrong.
>> >
>> > And besides, you'd still have to describe what you want the code to do 
>> > and
>> > if
>> > I'm not around, someone else will jump in with a suggestion--so you'll 
>> > get
>> > a
>> > quicker response.
>> >
>> > Tim Dolan wrote:
>> >>
>> >> Hi Dave,
>> >>              I tried to reply to you via  e-mail but I couldn't remove
>> >> the
>> >> xspam.
>> >> I don't mind sending you the whole spread sheet if that will help. 
>> >> Won't
>> >> that help make it easier.?
>> >>           The macro permitted me to include the previous weeks stats 
>> >> with
>> >> the summary.
>> >>                       Tim fm Ct
>> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> >> news:4223E52C.BBA4D28A@netscapeXSPAM.com...
>> >> >I really don't have a guess--so here it is!  (Since I don't know what
>> >> >you
>> >> >want
>> >> > the macro to do, all I can say is that this compiled ok:
>> >> >
>> >> > Option Explicit
>> >> >
>> >> > Sub PrintOut()
>> >> >    Dim myRange As Range
>> >> >
>> >> > '   ActiveSheet.Unprotect
>> >> >    Set myRange = Application.InputBox("Select the week number to
>> >> > print", _
>> >> >                        Type:=8)
>> >> >    Set myRange = Range(myRange.Offset(0, 6), _
>> >> >                          myRange.SpecialCells(xlLastCell))
>> >> >    myRange.EntireColumn.Hidden = True
>> >> >    If myRange.Column <> 10 Then
>> >> >        Range(myRange.Offset(0, -1), Cells(3, 
>> >> > 10)).EntireColumn.Hidden _
>> >> >                    = True
>> >> >    End If
>> >> >    ActiveSheet.PrintPreview
>> >> > '    ActiveSheet.PrintOut
>> >> >    Cells.EntireColumn.Hidden = False
>> >> >    ActiveSheet.Protect
>> >> > End Sub
>> >> >
>> >> > (I don't know if it does what you want.)
>> >> >
>> >> > Tim Dolan wrote:
>> >> >>
>> >> >> Dave,
>> >> >>          It didn't make a difference. BTW the line below the MYweek
>> >> >> line
>> >> >> had
>> >> >> an arrow next to it and it was highlighted in yellow.
>> >> >> Does that give and direction?
>> >> >>
>> >> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> >> >> news:422105C1.C418F51F@netscapeXSPAM.com...
>> >> >> > Try this against a copy of your workbook...
>> >> >> >
>> >> >> > Change this line:
>> >> >> > Set myWeek = Application.InputBox(.....
>> >> >> > to
>> >> >> > Set myRange = Application.InputBox(.....
>> >> >> >
>> >> >> > If it does what you want when you test it, woohoo.  If not, post
>> >> >> > back.
>> >> >> >
>> >> >> > Tim Dolan wrote:
>> >> >> >>
>> >> >> >> JE,
>> >> >> >>         Thanks for the reply but.... I don't know enough to
>> >> >> >> understand
>> >> >> >> what
>> >> >> >> you said. Do I have to put something into that part that I cut 
>> >> >> >> and
>> >> >> >> pasted
>> >> >> >> to
>> >> >> >> you?
>> >> >> >>
>> >> >> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
>> >> >> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
>> >> >> >> > Since you never set myRange, your
>> >> >> >> >
>> >> >> >> >    Set myRange = Range(myRange.Offset(0, 6)...
>> >> >> >> >
>> >> >> >> > throws an error.
>> >> >> >> >
>> >> >> >> > What is myRange? Is it the same as myWeek (which you don't do
>> >> >> >> > anything
>> >> >> >> > with)? If so, you'd benefit from putting Option Explicit at 
>> >> >> >> > the
>> >> >> >> > top
>> >> >> >> > of
>> >> >> >> > your module, so that you'd have to Dim each variable, and the
>> >> >> >> > compiler
>> >> >> >> > would have picked up the non-Dim of myRange or myWeek.
>> >> >> >> >
>> >> >> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
>> >> >> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
>> >> >> >> >
>> >> >> >> >> I've been trying to get a macro to work. It is a macro that
>> >> >> >> >> prints
>> >> >> >> >> the
>> >> >> >> >> previous week's data on a data sheet.
>> >> >> >> >> When I click on the macro, I get the message to enter week
>> >> >> >> >> number.
>> >> >> >> >> When I do that I get this error message. "run-time error 424"
>> >> >> >> >>                   object required
>> >> >> >> >> when I hit the debug button I get this
>> >> >> >> >> Sub PrintOut()
>> >> >> >> >> '   ActiveSheet.Unprotect
>> >> >> >> >>     Set myWeek = Application.InputBox("Select the week number 
>> >> >> >> >> to
>> >> >> >> >> print",
>> >> >> >> >> , ,
>> >> >> >> >> , , , , 8)
>> >> >> >> >>     Set myRange = Range(myRange.Offset(0, 6),
>> >> >> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
>> >> >> >> >>     If myRange.Column <> 10 Then
>> >> >> >> >>     Range(myRange.Offset(0, -1), Cells(3,
>> >> >> >> >> 10)).EntireColumn.Hidden
>> >> >> >> >> =
>> >> >> >> >> True
>> >> >> >> >>     End If
>> >> >> >> >>     ActiveSheet.PrintPreview
>> >> >> >> >> '    ActiveSheet.PrintOut
>> >> >> >> >>     Cells.EntireColumn.Hidden = False
>> >> >> >> >>     ActiveSheet.Protect
>> >> >> >> >> End Sub
>> >> >> >> >>
>> >> >> >> >> Would someone help me get this macro to work?
>> >> >> >
>> >> >> > --
>> >> >> >
>> >> >> > Dave Peterson
>> >> >
>> >> > --
>> >> >
>> >> > Dave Peterson
>> >
>> > --
>> >
>> > Dave Peterson
>
> -- 
>
> Dave Peterson 


0
r.dolan (11)
3/9/2005 4:11:20 AM
You may get a volunteer to open your file. 

But if you describe your problem in plain text using specific terms, you may get
others to help, too.

Tim Dolan wrote:
> 
> Please help me, if you can.
> I had a macro that worked on a spread sheet that I use to keep stats for a
> seniors 8-ball league.
> A person helped me with my stats and really made it better. However, the
> macro that I had that allowed me to print previous weeks stats no longer
> works.
> I haven't been able to describe the macro very well and  apparently
> worksheets can contain viruses.
> Here's my question.
> I have Norton Internet Security 2005. How can I make my worksheet safe for
> this NG so I can get your help?
>      Thanks in advance,
>                                 Tim fm CT
> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> news:42276C30.24D59D05@netscapeXSPAM.com...
> > Workbooks can have macros in them.  Not all macros are written by nice
> > people.
> > (Even though yours might not do any damage, it's still my general rule not
> > to
> > open other people's workbooks.)
> >
> >
> >
> > Tim Dolan wrote:
> >>
> >> Dave,
> >>          Wow! I just got a "brain storm". I put the summary up on the web
> >> every week.
> >> Check out www.ctpoolleague.com and click on the "shooters standings".
> >>          Tim fm Ct
> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> >> news:4224D284.FE2E7E4F@netscapeXSPAM.com...
> >> >I don't like to open workbooks--too many things can go wrong.
> >> >
> >> > And besides, you'd still have to describe what you want the code to do
> >> > and
> >> > if
> >> > I'm not around, someone else will jump in with a suggestion--so you'll
> >> > get
> >> > a
> >> > quicker response.
> >> >
> >> > Tim Dolan wrote:
> >> >>
> >> >> Hi Dave,
> >> >>              I tried to reply to you via  e-mail but I couldn't remove
> >> >> the
> >> >> xspam.
> >> >> I don't mind sending you the whole spread sheet if that will help.
> >> >> Won't
> >> >> that help make it easier.?
> >> >>           The macro permitted me to include the previous weeks stats
> >> >> with
> >> >> the summary.
> >> >>                       Tim fm Ct
> >> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> >> >> news:4223E52C.BBA4D28A@netscapeXSPAM.com...
> >> >> >I really don't have a guess--so here it is!  (Since I don't know what
> >> >> >you
> >> >> >want
> >> >> > the macro to do, all I can say is that this compiled ok:
> >> >> >
> >> >> > Option Explicit
> >> >> >
> >> >> > Sub PrintOut()
> >> >> >    Dim myRange As Range
> >> >> >
> >> >> > '   ActiveSheet.Unprotect
> >> >> >    Set myRange = Application.InputBox("Select the week number to
> >> >> > print", _
> >> >> >                        Type:=8)
> >> >> >    Set myRange = Range(myRange.Offset(0, 6), _
> >> >> >                          myRange.SpecialCells(xlLastCell))
> >> >> >    myRange.EntireColumn.Hidden = True
> >> >> >    If myRange.Column <> 10 Then
> >> >> >        Range(myRange.Offset(0, -1), Cells(3,
> >> >> > 10)).EntireColumn.Hidden _
> >> >> >                    = True
> >> >> >    End If
> >> >> >    ActiveSheet.PrintPreview
> >> >> > '    ActiveSheet.PrintOut
> >> >> >    Cells.EntireColumn.Hidden = False
> >> >> >    ActiveSheet.Protect
> >> >> > End Sub
> >> >> >
> >> >> > (I don't know if it does what you want.)
> >> >> >
> >> >> > Tim Dolan wrote:
> >> >> >>
> >> >> >> Dave,
> >> >> >>          It didn't make a difference. BTW the line below the MYweek
> >> >> >> line
> >> >> >> had
> >> >> >> an arrow next to it and it was highlighted in yellow.
> >> >> >> Does that give and direction?
> >> >> >>
> >> >> >> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> >> >> >> news:422105C1.C418F51F@netscapeXSPAM.com...
> >> >> >> > Try this against a copy of your workbook...
> >> >> >> >
> >> >> >> > Change this line:
> >> >> >> > Set myWeek = Application.InputBox(.....
> >> >> >> > to
> >> >> >> > Set myRange = Application.InputBox(.....
> >> >> >> >
> >> >> >> > If it does what you want when you test it, woohoo.  If not, post
> >> >> >> > back.
> >> >> >> >
> >> >> >> > Tim Dolan wrote:
> >> >> >> >>
> >> >> >> >> JE,
> >> >> >> >>         Thanks for the reply but.... I don't know enough to
> >> >> >> >> understand
> >> >> >> >> what
> >> >> >> >> you said. Do I have to put something into that part that I cut
> >> >> >> >> and
> >> >> >> >> pasted
> >> >> >> >> to
> >> >> >> >> you?
> >> >> >> >>
> >> >> >> >> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
> >> >> >> >> news:jemcgimpsey-05E9BF.14364025022005@msnews.microsoft.com...
> >> >> >> >> > Since you never set myRange, your
> >> >> >> >> >
> >> >> >> >> >    Set myRange = Range(myRange.Offset(0, 6)...
> >> >> >> >> >
> >> >> >> >> > throws an error.
> >> >> >> >> >
> >> >> >> >> > What is myRange? Is it the same as myWeek (which you don't do
> >> >> >> >> > anything
> >> >> >> >> > with)? If so, you'd benefit from putting Option Explicit at
> >> >> >> >> > the
> >> >> >> >> > top
> >> >> >> >> > of
> >> >> >> >> > your module, so that you'd have to Dim each variable, and the
> >> >> >> >> > compiler
> >> >> >> >> > would have picked up the non-Dim of myRange or myWeek.
> >> >> >> >> >
> >> >> >> >> > In article <irMTd.3745$DW.1652@newssvr17.news.prodigy.com>,
> >> >> >> >> > "Tim Dolan" <r.dolan@snet.net> wrote:
> >> >> >> >> >
> >> >> >> >> >> I've been trying to get a macro to work. It is a macro that
> >> >> >> >> >> prints
> >> >> >> >> >> the
> >> >> >> >> >> previous week's data on a data sheet.
> >> >> >> >> >> When I click on the macro, I get the message to enter week
> >> >> >> >> >> number.
> >> >> >> >> >> When I do that I get this error message. "run-time error 424"
> >> >> >> >> >>                   object required
> >> >> >> >> >> when I hit the debug button I get this
> >> >> >> >> >> Sub PrintOut()
> >> >> >> >> >> '   ActiveSheet.Unprotect
> >> >> >> >> >>     Set myWeek = Application.InputBox("Select the week number
> >> >> >> >> >> to
> >> >> >> >> >> print",
> >> >> >> >> >> , ,
> >> >> >> >> >> , , , , 8)
> >> >> >> >> >>     Set myRange = Range(myRange.Offset(0, 6),
> >> >> >> >> >> myRange.SpecialCells(xlLastCell)).EntireColumn.Hidden = True
> >> >> >> >> >>     If myRange.Column <> 10 Then
> >> >> >> >> >>     Range(myRange.Offset(0, -1), Cells(3,
> >> >> >> >> >> 10)).EntireColumn.Hidden
> >> >> >> >> >> =
> >> >> >> >> >> True
> >> >> >> >> >>     End If
> >> >> >> >> >>     ActiveSheet.PrintPreview
> >> >> >> >> >> '    ActiveSheet.PrintOut
> >> >> >> >> >>     Cells.EntireColumn.Hidden = False
> >> >> >> >> >>     ActiveSheet.Protect
> >> >> >> >> >> End Sub
> >> >> >> >> >>
> >> >> >> >> >> Would someone help me get this macro to work?
> >> >> >> >
> >> >> >> > --
> >> >> >> >
> >> >> >> > Dave Peterson
> >> >> >
> >> >> > --
> >> >> >
> >> >> > Dave Peterson
> >> >
> >> > --
> >> >
> >> > Dave Peterson
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
ec357201 (5290)
3/9/2005 12:24:14 PM
Reply:

Similar Artilces:

Rules Wizard Not Working Properly
I have a rule set up to permanently delete messages that arrive without my name in the "to" box. It is still putting them in my "in" box as if the rule is not even set. I made sure the correct box was checked to activate the rule so I know that's not the problem. After the spam messages without my name in the "to" arrive in my "in" box, I am able to select "Rules" and then "Run Now" and it sends the items to the Trash. Just can't figure out why it doesn't do this on its own. Any suggestions? Thank you RBurke <a...

HQ Server/Client Issues after applying HotFix 2.0.0115
I applied HotFix 2.0.0115 Tuesday night/Wednesday and today we seem to be having a lot of connection issues. Worksheet 401s are taking a long time to process, and by "a long time" I mean 5+ minutes instead of the usual 40 seconds. Whenever a client is connected to HQ, the machine that hosts HQ Server sees CPU usage at 70% or higher for the duration of the connection. Has anybody else experience this problem? Tom -- Stop fishing for e-mail This is a multi-part message in MIME format. ------=_NextPart_000_00FF_01C885DC.3C0CF2C0 Content-Type: text/plain; charset="utf-8&...

Number AutoCorrect 2
I need an Invoice Number text box in the format “0000-yy”. The catch is, users are supposed to enter “0345-yy”, but some will forget to enter the zero “345- 07”. How can I get it so that if the zero is left out an expression will automatically enter it? Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200712/1 One choice is to use an input mask in an attempt to force the users to enter six digits. Something like this may do it: 0000-00 However, it does not prevent users from entering the zero at the end. Assuming the year is alread...

how to get rid of errors? #2
Thanks for the input, but actually I was more concerned about gettin rid of all error messages when the file loads up. It looks like yo gave me a cool utility, but I am not too concerned about fixing th links. Is there a way to ignore all messages that pop up when i load my exce sheet? regardless of what it is? Thank -- Jon ----------------------------------------------------------------------- Jonx's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1317 View this thread: http://www.excelforum.com/showthread.php?threadid=26148 Think deleting all the "pha...

DPM and SharePoint not working well
A coworker installed DPM 2007 in our test environement. I can select all server that I have installed DPM agent on and take file backup, system state etc, but the node (frontend) I've enabled DPM on, when I expand the node, only a infinite hour glass show up, when I try to select another node, I get this errror: The operation failed because an error occurred while enumerating the data source for Virtual SP Search Writer. Check to see that the data source specified in the error message is online and accessible. ID: 921 Details: Class not registered (0x80040154) I&...

Deletion is not working
Hello all, If one of you could help me with this issue, it would be great. I try to delete some duplicated activities in the web version of CRM and it failed everytimes (I have to close my CRM with the ctrl+alt+del to be able to do something). So, we restarted the deletion service on the server and it's still not working. Does one of you have an idea of what's going on? Thank you very much! ...

Money 97 on Microsoft XP #2
Bob, thanks for answer. I=B4m located in Madrid, Spain. How could I buy Money 2006? Microsoft Europe adviced that is only available on USA. And in any case, after bought and downloaded M2006: It will be possible to import my files created with Money 97? regards , Joe. I can only think of Amazon.com or eBay. However it is virtually impossible to get a file created by a non-US version into a US one. There are some very tedious steps to export and import but you lose so much information it really isn't worth it. See http://money.mvps.org/faq/article/28.aspx and importantly the Notes at...

Conditional Formula #2
Hi All- I want to write a formula that will look at project value and assign a % fee charge as follows: Project 0 - $ 100, Fee 10%; Project $101 -$500, Fee 8%, Project above $501, Fee 5%. I can write the formula that looks at project cost and finds fee, BUT I want to set it so that a $600 project will generate a 10% charge for first $100, 8% charge for next $399 and a 5% charge for the remaining $99. How do I do it? Many Thanks!! Assuming Project Cost is in cell A1, try this: =(MIN(A1,100)*0.1)+IF(A1>100,(A1-100)*0.08,0)+IF(A1>500,(A1-500)*0.05,0) HTH, Elkar "Captain ...

drawing toolbar #2
does anyone know how to get the Drawing toolbar to appear? clicking the drawing icon and selecting drawing from the view -> toolbars menu do not seem to work.. it is as though the toolbar is there, but hidden somewhere... how do I get it to appear .. thanks in advance, Maree try view << toolbar <<drawing thereafter it would normally pop up somewhere at the bottom of the page. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Hi Maree It tends to pl...

1.2 Redeployment Tool Unhandled Exception
I am trying to recreate a V1.2 environment for testing purposes (with a view to upgrade to V3.0) Have restored db's but when I try to run the redeployment wizard I get the following error message:- An unhandled exception has occured in your application... Unkown error (0x80005000) The details are shown below. Anyone experience this before or have any ideas? Most grateful for any help. Details: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Runtime.InteropServices.COM...

The macro cannot be found
I have problem when I wanna open Excel Files. The error message is like this : The macro "C:\Windows\Application Data\Microsoft\Excel\XLSTART\Book1'!Test5' cannot be found. Please help me. Thanks. Anathapindika. Does this happen when you're starting excel or does it happen when you do File|Open from within xl? Does it happen when you double click on a file (in windows explorer) with xl open or when excel is closed? I'm gonna guess that it happens when you start excel (maybe by double clicking on a file in explorer). Excel loads files in your XLStart folder and addi...

Send To (Not Working)
Hi all, I am having a nightmare with a GP 10 installation on a Win2003 Terminal Server. Apart from horrific GP startup speed (fine for the local administrator on the terminal server) I am also having trouble with simply sending (either txt or pdf) documents from the screen layout window for any report generated in GP. The button is active as is the option to select either Txt or Pdf (we are running Adobe 6.0) but the new message window that normally opens up for you to insert a mail address (with the respective attachment) simply does not open. Anyone please help. There is nothing on ...

Concatenate 2 columns date & time
Hi, I am working with Excel 2003 and have a ws that I need to combine column B which is a date, with column C which contains the time. No matter how I have formatted column D, I cannot get the date to display correctly. What I have is: B C 05/01/2010 10:55 24/12/2009 09:35 I need column D to show as: 05/01/2010 10:55 24/12/2009 09:35 I have tried several different formulas/formatting in Column D but always end u...

GP 9.0 on SQL 2008 #2
Is GP9.0 supported on SQL Server 2008? Does GP9.0 appear to perform correctly on SQL Server 2008? Thank you. GP 9.0 is not officially supported on SQL Server 2008, however, if your databases are on SQL Server 2005, you can transfer them to a SQL Server 2008 box under database compatibility 9.0 (SQL Server 2005). Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com "Marv" wrote: > Is GP9.0 supported on SQL Server 2008? Does GP9.0 appear to p...

CPropertySheet OK Button Event Handling Not Work
I have handled the event of OK button in a CPropertySheet like this: BOOL CSkifknedSheet::OnCommand (WPARAM wParam, LPARAM lParam) { if (CWnd::OnCommand (wParam, lParam)) return TRUE; UINT nID = LOWORD(wParam); HWND hWndCtrl = (HWND)lParam; int nCode = HIWORD(wParam); if (hWndCtrl != NULL && nCode == BN_CLICKED) if (::SendMessage(hWndCtrl, WM_GETDLGCODE, 0, 0) & (DLGC_BUTTON|DLGC_DEFPUSHBUTTON)) { LONG lStyle = ::GetWindowLong(hWndCtrl, GWL_STYLE) & 0x0F; if (lStyle == BS_PUSHBUTTON || l...

funny working ListBox or a bug in VS 6.0 ?
Hi! I have a problem with setting the character set in my ListBox (List). When I create a CFont object with a specific character set and I set that font in the Device Context recieved from the ListBox, then it is OK. I can write through that DC in the chosen charset. See Code : CFont * font = new CFont; CFont *oldFont; CPaintDC dc( List ); font->CreateFont (28,0,0,0,700,0,0,0, RUSSIAN_CHARSET,OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Arial"); oldFont = dc.SelectObject( font); dc.ExtTextOut(10,170,0, NULL,"some text", str...

OWA Help
Have a single Exchange server (Win2K, SP4 with Exch 2003 Sp2) in a single domain behind a firewall (Win2K,Sp4 with ISA 2000, SP2). The updates are recent. After the Updates to the Operating Systems and before the updates to ISA, OWA displayed to users "Page cannot be displayed". I've research KB articles and set the advised Web/Exchange Directory permissions. Am I missing something? I've got a nagging feeling that I'm missing something incredibly simple. Thanks in advance Jim ...

Snoozing reminders for 2 weeks doesn't work?
I've always found that snoozing a reminder for 2 weeks doesn't appear to work -- I see a reminder within a few minutes. 1 week and below seems to work fine. Is this a known issue? Googling didn't turn up anything... Thanks -- Aidan Whitehall ...

2 pcs
I have money on my home tower. However, we often go volunteering for 2 months or more. Would like to transfer money to my notebook while gone. Any suggestions? TIA -- ____________________________________ In Christ's matchless name ted & colleen n6trf kc6rue If the Money license is a retail license, you can install/use it on both machines per the EULA terms. Move the data file over, Go. Com back. Move the data file back. "n6trf" <n6trf@arrl.net> wrote in message news:Oxjr%2390BHHA.4992@TK2MSFTNGP03.phx.gbl... >I have money on my ...

Outlook Rules Stop Working
We are running Exchange 2003 (on a Server 2003) and Outlook 2003 with about 125 users. All of our rules in Outlook used to work automatically until the past weekend after we did a restore of a bunch of message files into the mailboxes on the Exchange server using Veritas Backupexec. Since then, the rules will work if the sender has an account on our Exchange server or if we manually execute them. If the message is from outside of our organization, then it doesn't matter if the rule is looking for a specific sender or words in the subject/message body, it will not fire. I noticed...

MAPI #2
I am using Canon Zoombrowser EX to send photos through Outlook 2000. After sending one photo tonight and trying to send another, I get an error message that says I need an email program with MAPI - despite the fact that I have sent them this way before. Is there some configuration change that I need to make? ...

Flash 10 {and likely 9} and AIR 1.5.2 vulnerabilities
*IF* you have Flash and/or AIR installed there are some new vulnerabilities: http://www.adobe.com/support/security/bulletins/apsb09-19.html which, once again, subjects users to malicious coding. Release date: December 8, 2009 Last updated: December 10, 2009 Vulnerability identifier: APSB09-19 CVE numbers: CVE-2009-3794, CVE-2009-3796, CVE-2009-3797, CVE-2009-3798, CVE-2009-3799, CVE-2009-3800, CVE-2009-3951 Platform: All Platforms --- *TRY* to understand that the REASON the numerous Flash vulnerabilities affect *ALL* OSs installed in, is because these, as well a...

Split one coloumn into 2 in Excel
Hi,I have an excel spreadsheet where I have a lot of values in coloumn A.I want to split this into A and B. ( like a snake )Coloumn A have: 1000, 1001, 1002, 1003 etcI want to have A: 1000, B: 1001, A: 1002, B: 1003 etcIs there an easy way to do this? This newsgroup is intended for questions about Access, the databsae product that's part of Office Professional.I'd suggest reposting your question to a newsgroup that's related to Excel.-- Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele(no e-mails, please!)<ingve@reslab.no> wrote in message news:1175164779.253238.214190@...

Implement Task Manager's End Task (so that it works quickly)
First this isn't relevant to this group, but I didn't see the group that it was related to so if you would pass this on I would appreciate it. There are a lot of times when an application hangs and I need to either reboot the computer (or shut it down real hard - hold the power off button) because an application is hanging. If the end task was implemented and it stopped the application quickly I would be really happy. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the...

Opening Works 6.0/2000 Spreadsheets in Excell 2003
Can anyone help with the following? Please! I am trying to use Excell 1997, 2000 or 2003 (eihter one) to open some older files that were originally created with the MS Works 6.0 or 2000 (not sure which) Spreadsheet program. These files will not open and will not import. I no longer have access to the original spreadsheet application but rally need the data saved in the files. Found my own answer. This works well but the free version still leaves you with some work. http://www.rl- software.com/indexjs.htm?/converter/wkscnvxls_e.htm >-----Original Message----- >Can anyone he...