PC Review


Reply
Thread Tools Rate Thread

Code running slowly

 
 
ordnance1
Guest
Posts: n/a
 
      3rd Apr 2010
Not sure why it runs slow. I thought the Application.ScreenUpdating =
False would do the trick.

Sub Holidays()

Application.ScreenUpdating = False

'New Years Day

With Sheets("January")

If Range("C4") = Range("R2") Then
Range("B27").Value = "New Years"
Range("B27").HorizontalAlignment = xlCenter
Range("B30").Value = "Day"
Range("B30").HorizontalAlignment = xlCenter
Range("A3").Select

ElseIf Range("B27") = "New Years" Then

Range("B27").Value = ""
Range("B27").HorizontalAlignment = xlLeft
Range("B27").IndentLevel = 1
Range("B30").Value = ""
Range("B30").HorizontalAlignment = xlLeft
Range("B30").IndentLevel = 1
Range("A3").Select

End If

If Range("E4") = Range("R2") Then
Range("D27").Value = "New Years"
Range("D27").HorizontalAlignment = xlCenter
Range("D30").Value = "Day"
Range("D30").HorizontalAlignment = xlCenter
Range("A3").Select

ElseIf Range("D27") = "New Years" Then

Range("D27").Value = ""
Range("D27").HorizontalAlignment = xlLeft
Range("D27").IndentLevel = 1
Range("D30").Value = ""
Range("D30").HorizontalAlignment = xlLeft
Range("D30").IndentLevel = 1
Range("A3").Select

End If

End With

Application.ScreenUpdating = True

End Sub


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update "centerheader" code running slowly need help speeding up Breck Microsoft Excel Programming 7 16th Jan 2009 06:18 AM
XP running VERY slowly ??? BertieBigBollox@gmail.com Windows XP Help 16 2nd Aug 2007 04:20 PM
running very slowly =?Utf-8?B?dGJpc2hvcA==?= Microsoft Word Document Management 0 9th Jan 2006 05:50 PM
Paste code running extremely slowly... KR Microsoft Excel Programming 1 3rd Aug 2005 03:26 PM
Re: running slowly Ken Blake Windows XP General 0 21st Nov 2003 05:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:21 AM.