+ Reply to Thread
Results 1 to 5 of 5

Increase Speed

Hybrid View

Guest Increase Speed 05-04-2005, 12:06 PM
Guest Re: Increase Speed 05-04-2005, 12:06 PM
Guest Re: Increase Speed 05-04-2005, 12:06 PM
Guest Re: Increase Speed 05-04-2005, 02:06 PM
Guest Re: Increase Speed 05-04-2005, 03:06 PM
  1. #1
    SIGE_GOEVAERTS@HOTMAIL.COM
    Guest

    Increase Speed

    Hi There,

    Normally underneath macro runs quite smoothly.
    But sometimes this macro takes ages to complete...not that it bugs but
    the calculation speed is like litterally 100 times slower. (for the
    same range-sizes!)
    All I can do is Close Excel and restart the marco ... to let it run at
    normal speed.
    Any Ideas? -For Improvement?

    Option Explicit

    Sub BlanksToNumbers()
    Dim r As Range
    Dim w As Worksheet
    On Error GoTo err
    Application.ScreenUpdating = False
    For Each w In ActiveWorkbook.Worksheets
    For Each r In w.UsedRange.Cells
    r.Cells.Font.Name = "Arial"
    If r.Text = "" And r.Formula = "" Then r.Value = ""
    Next r
    Next w
    Application.ScreenUpdating = True
    err:
    End Sub

    Cheers, Sige


  2. #2
    Don Guillett
    Guest

    Re: Increase Speed

    this should change the font for the entire workbook which should be better
    than changing part of each worksheet.

    Sub changefontinworkbook()
    Sheets.Select
    Sheets(1).Activate
    Cells.Select
    With Selection.Font
    .Name = "arial"
    End With
    Range("A1").Select
    Sheets(1).Select
    End Sub

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    <SIGE_GOEVAERTS@HOTMAIL.COM> wrote in message
    news:1115219463.940165.284430@f14g2000cwb.googlegroups.com...
    > Hi There,
    >
    > Normally underneath macro runs quite smoothly.
    > But sometimes this macro takes ages to complete...not that it bugs but
    > the calculation speed is like litterally 100 times slower. (for the
    > same range-sizes!)
    > All I can do is Close Excel and restart the marco ... to let it run at
    > normal speed.
    > Any Ideas? -For Improvement?
    >
    > Option Explicit
    >
    > Sub BlanksToNumbers()
    > Dim r As Range
    > Dim w As Worksheet
    > On Error GoTo err
    > Application.ScreenUpdating = False
    > For Each w In ActiveWorkbook.Worksheets
    > For Each r In w.UsedRange.Cells
    > r.Cells.Font.Name = "Arial"
    > If r.Text = "" And r.Formula = "" Then r.Value = ""
    > Next r
    > Next w
    > Application.ScreenUpdating = True
    > err:
    > End Sub
    >
    > Cheers, Sige
    >




  3. #3
    Don Guillett
    Guest

    Re: Increase Speed

    or
    Sub chgfontname()
    Sheets.Select
    Cells.Select
    Selection.Font.Name = "arial"
    Range("a1").Select
    Sheets(1).Select
    End Sub

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "Don Guillett" <donaldb@281.com> wrote in message
    news:uw37JEMUFHA.3184@TK2MSFTNGP15.phx.gbl...
    > this should change the font for the entire workbook which should be better
    > than changing part of each worksheet.
    >
    > Sub changefontinworkbook()
    > Sheets.Select
    > Sheets(1).Activate
    > Cells.Select
    > With Selection.Font
    > .Name = "arial"
    > End With
    > Range("A1").Select
    > Sheets(1).Select
    > End Sub
    >
    > --
    > Don Guillett
    > SalesAid Software
    > donaldb@281.com
    > <SIGE_GOEVAERTS@HOTMAIL.COM> wrote in message
    > news:1115219463.940165.284430@f14g2000cwb.googlegroups.com...
    > > Hi There,
    > >
    > > Normally underneath macro runs quite smoothly.
    > > But sometimes this macro takes ages to complete...not that it bugs but
    > > the calculation speed is like litterally 100 times slower. (for the
    > > same range-sizes!)
    > > All I can do is Close Excel and restart the marco ... to let it run at
    > > normal speed.
    > > Any Ideas? -For Improvement?
    > >
    > > Option Explicit
    > >
    > > Sub BlanksToNumbers()
    > > Dim r As Range
    > > Dim w As Worksheet
    > > On Error GoTo err
    > > Application.ScreenUpdating = False
    > > For Each w In ActiveWorkbook.Worksheets
    > > For Each r In w.UsedRange.Cells
    > > r.Cells.Font.Name = "Arial"
    > > If r.Text = "" And r.Formula = "" Then r.Value = ""
    > > Next r
    > > Next w
    > > Application.ScreenUpdating = True
    > > err:
    > > End Sub
    > >
    > > Cheers, Sige
    > >

    >
    >




  4. #4
    Jef Gorbach
    Guest

    Re: Increase Speed

    or for speed, skip the selecting:

    sub chgfontname()
    sheets(1).font.name="arial"
    end sub

    "Don Guillett" <donaldb@281.com> wrote in message
    news:ez4N9JMUFHA.4056@TK2MSFTNGP15.phx.gbl...
    > or
    > Sub chgfontname()
    > Sheets.Select
    > Cells.Select
    > Selection.Font.Name = "arial"
    > Range("a1").Select
    > Sheets(1).Select
    > End Sub
    >
    > --
    > Don Guillett
    > SalesAid Software
    > donaldb@281.com
    > "Don Guillett" <donaldb@281.com> wrote in message
    > news:uw37JEMUFHA.3184@TK2MSFTNGP15.phx.gbl...
    > > this should change the font for the entire workbook which should be

    better
    > > than changing part of each worksheet.
    > >
    > > Sub changefontinworkbook()
    > > Sheets.Select
    > > Sheets(1).Activate
    > > Cells.Select
    > > With Selection.Font
    > > .Name = "arial"
    > > End With
    > > Range("A1").Select
    > > Sheets(1).Select
    > > End Sub
    > >
    > > --
    > > Don Guillett
    > > SalesAid Software
    > > donaldb@281.com
    > > <SIGE_GOEVAERTS@HOTMAIL.COM> wrote in message
    > > news:1115219463.940165.284430@f14g2000cwb.googlegroups.com...
    > > > Hi There,
    > > >
    > > > Normally underneath macro runs quite smoothly.
    > > > But sometimes this macro takes ages to complete...not that it bugs but
    > > > the calculation speed is like litterally 100 times slower. (for the
    > > > same range-sizes!)
    > > > All I can do is Close Excel and restart the marco ... to let it run at
    > > > normal speed.
    > > > Any Ideas? -For Improvement?
    > > >
    > > > Option Explicit
    > > >
    > > > Sub BlanksToNumbers()
    > > > Dim r As Range
    > > > Dim w As Worksheet
    > > > On Error GoTo err
    > > > Application.ScreenUpdating = False
    > > > For Each w In ActiveWorkbook.Worksheets
    > > > For Each r In w.UsedRange.Cells
    > > > r.Cells.Font.Name = "Arial"
    > > > If r.Text = "" And r.Formula = "" Then r.Value = ""
    > > > Next r
    > > > Next w
    > > > Application.ScreenUpdating = True
    > > > err:
    > > > End Sub
    > > >
    > > > Cheers, Sige
    > > >

    > >
    > >

    >
    >




  5. #5
    Don Guillett
    Guest

    Re: Increase Speed

    and for the rest of the sheets?

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "Jef Gorbach" <Jefgorbach@aol.com> wrote in message
    news:OVYBnuMUFHA.584@TK2MSFTNGP15.phx.gbl...
    > or for speed, skip the selecting:
    >
    > sub chgfontname()
    > sheets(1).font.name="arial"
    > end sub
    >
    > "Don Guillett" <donaldb@281.com> wrote in message
    > news:ez4N9JMUFHA.4056@TK2MSFTNGP15.phx.gbl...
    > > or
    > > Sub chgfontname()
    > > Sheets.Select
    > > Cells.Select
    > > Selection.Font.Name = "arial"
    > > Range("a1").Select
    > > Sheets(1).Select
    > > End Sub
    > >
    > > --
    > > Don Guillett
    > > SalesAid Software
    > > donaldb@281.com
    > > "Don Guillett" <donaldb@281.com> wrote in message
    > > news:uw37JEMUFHA.3184@TK2MSFTNGP15.phx.gbl...
    > > > this should change the font for the entire workbook which should be

    > better
    > > > than changing part of each worksheet.
    > > >
    > > > Sub changefontinworkbook()
    > > > Sheets.Select
    > > > Sheets(1).Activate
    > > > Cells.Select
    > > > With Selection.Font
    > > > .Name = "arial"
    > > > End With
    > > > Range("A1").Select
    > > > Sheets(1).Select
    > > > End Sub
    > > >
    > > > --
    > > > Don Guillett
    > > > SalesAid Software
    > > > donaldb@281.com
    > > > <SIGE_GOEVAERTS@HOTMAIL.COM> wrote in message
    > > > news:1115219463.940165.284430@f14g2000cwb.googlegroups.com...
    > > > > Hi There,
    > > > >
    > > > > Normally underneath macro runs quite smoothly.
    > > > > But sometimes this macro takes ages to complete...not that it bugs

    but
    > > > > the calculation speed is like litterally 100 times slower. (for the
    > > > > same range-sizes!)
    > > > > All I can do is Close Excel and restart the marco ... to let it run

    at
    > > > > normal speed.
    > > > > Any Ideas? -For Improvement?
    > > > >
    > > > > Option Explicit
    > > > >
    > > > > Sub BlanksToNumbers()
    > > > > Dim r As Range
    > > > > Dim w As Worksheet
    > > > > On Error GoTo err
    > > > > Application.ScreenUpdating = False
    > > > > For Each w In ActiveWorkbook.Worksheets
    > > > > For Each r In w.UsedRange.Cells
    > > > > r.Cells.Font.Name = "Arial"
    > > > > If r.Text = "" And r.Formula = "" Then r.Value = ""
    > > > > Next r
    > > > > Next w
    > > > > Application.ScreenUpdating = True
    > > > > err:
    > > > > End Sub
    > > > >
    > > > > Cheers, Sige
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1