Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2006

Tip: Looking for answers? Try searching our database.

macro not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim fm  ct - 16 Dec 2006 20:10 GMT
I've contacted this group before but was unable to folow through.
I have a macro on a spreadsheet made on excel 2000.
I have a virus protection program. Is there any way I can send my
spreadsheet to someone and have the macro fixed?
             Thanks in advance,
                                            Tim fm CT
L. Howard Kittle - 16 Dec 2006 20:40 GMT
Hi Tim,

Post your code here, lots of folks will take a look at it.  Probably don't
need the workbook, but sometimes it comes to that.

Regards,
Howard

> I've contacted this group before but was unable to folow through.
> I have a macro on a spreadsheet made on excel 2000.
> I have a virus protection program. Is there any way I can send my
> spreadsheet to someone and have the macro fixed?
>              Thanks in advance,
>                                             Tim fm CT
Otto Moehrbach - 16 Dec 2006 21:37 GMT
As Howard said, post your macro.  But also provide a blow-by-blow of what
the macro is supposed to do.  Then provide information on what the macro
actually does.  For instance, do you get an error?  If so, what is the
error?  When you get the error, and click on the Debug button in the error
message box, what line of your macro do you see highlighted?
If you don't get an error, what do you get?  HTH  Otto
> I've contacted this group before but was unable to folow through.
> I have a macro on a spreadsheet made on excel 2000.
> I have a virus protection program. Is there any way I can send my
> spreadsheet to someone and have the macro fixed?
>              Thanks in advance,
>                                             Tim fm CT
Tim Dolan - 18 Dec 2006 01:13 GMT
Hi.
   The macro is to print previous weeks data. When I activate the macro, it
askes for the week. No matter waht week I select I get an error.
When I select debug It shows the info below with the line that starts with
"set my range" highlited in yellow.. thanks for your reply.
                        Tim fm CT

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

Sub PrintStandings()
   ActiveSheet.PageSetup.PrintArea = Range("LeagueStandings").Address
'    ActiveSheet.PrintPreview
   ActiveSheet.PrintOut
End Sub

Sub PrintTopRank()
   ActiveSheet.PageSetup.PrintArea = Range("TopRank").Address
'    ActiveSheet.PrintPreview
   ActiveSheet.PrintOut
End Sub

Sub PrintWeeklyResults()
   ActiveSheet.PageSetup.PrintArea = Range("WeeklyResults").Address
   ActiveSheet.PrintPreview
'    ActiveSheet.PrintOut
End Sub

> As Howard said, post your macro.  But also provide a blow-by-blow of what
> the macro is supposed to do.  Then provide information on what the macro
[quoted text clipped - 8 lines]
>>              Thanks in advance,
>>                                             Tim fm CT
Joerg - 18 Dec 2006 02:39 GMT
Haven't looked at the rest of your code, but it's clear why you get this
error.

Look at the right side of the equation in your line Set myRange =
Range(myRange.Offset(0, 6)...
You use myRange, though it hasn't been defined yet. Use a range that has
been defined (a name different from 'myRange' would be preferable).

Joerg Mochikun

> Hi.
>     The macro is to print previous weeks data. When I activate the macro, it
[quoted text clipped - 48 lines]
> >>              Thanks in advance,
> >>                                             Tim fm CT
Don Guillett - 18 Dec 2006 14:05 GMT
Besides no range being set, I'm confused. Why don't you tell us what you are
trying to do.
BTW You do NOT have to set a print area to print a range

Sub PrintTopRank()
   ActiveSheet.PageSetup.PrintArea = Range("TopRank").Address
   ActiveSheet.PrintPreview
   ActiveSheet.PrintOut
End Sub

Can be this and it does NOT have to be the active sheet.
Sub PrintTopRank()
Range("TopRank").PrintPreview
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Hi.
>    The macro is to print previous weeks data. When I activate the macro,
[quoted text clipped - 48 lines]
>>>              Thanks in advance,
>>>                                             Tim fm CT

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.