This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

this doesn't work....look at this

Posted by: Anonymous Coward on November 18, 2006 06:46 AM
Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Module1
Rem Option Explicit
Rem
Rem ' Developed by John Walkenbach
Rem ' of JWalk and Associates
Rem ' <a href="http://www.j-walk.com/ss/" title="j-walk.com">http://www.j-walk.com/ss/</a j-walk.com>
Rem ' Thanks to GeeDee for suggesting the animation and colors.
Rem
Rem Dim r As Long
Rem
Rem
Rem
Rem
Rem Sub Scroller_Click()
Rem Range("FavoriteNum").Value = " "
Rem End Sub
Rem Sub RandomButton_Click()
Rem Application.ScreenUpdating = False
Rem Range("a_inc").Value = Rnd() * 1000
Rem Range("b_inc").Value = Rnd() * 1000
Rem Range("t_inc").Value = Rnd() * 1000
Rem Range("FavoriteNum").Value = ""
Rem Application.ScreenUpdating = True
Rem End Sub
Rem
Rem Sub NextFavoriteButton_Click()
Rem Application.ScreenUpdating = False
Rem r = Range("FavoriteNum").Value + 1
Rem If r > Application.CountA(Range("Favorites").EntireColum<nobr>n<wbr></nobr> ) Then r = 1
Rem Range("a_inc").Value = Range("Favorites").Offset(r - 1, 0).Value
Rem Range("b_inc").Value = Range("Favorites").Offset(r - 1, 1).Value
Rem Range("t_inc").Value = Range("Favorites").Offset(r - 1, 2).Value
Rem Range("FavoriteNum").Value = r
Rem Application.ScreenUpdating = True
Rem End Sub
Rem
Rem Sub PreviousFavoriteButton_Click()
Rem Application.ScreenUpdating = False
Rem r = Range("FavoriteNum").Value - 1
Rem If r = 0 Then r = Application.CountA(Range("Favorites").EntireColum<nobr>n<wbr></nobr> )
Rem Range("a_inc").Value = Range("Favorites").Offset(r - 1, 0).Value
Rem Range("b_inc").Value = Range("Favorites").Offset(r - 1, 1).Value
Rem Range("t_inc").Value = Range("Favorites").Offset(r - 1, 2).Value
Rem Range("FavoriteNum").Value = r
Rem Application.ScreenUpdating = True
Rem End Sub
Rem
Rem Sub AddToFavoritesButton_Cklick()
Rem Dim EmptyStr As String
Rem EmptyStr = ""
Rem
Rem If Range("FavoriteNum").Value = EmptyStr Then
Rem Application.ScreenUpdating = False
Rem Application.Calculation = xlCalculationManual
Rem r = Application.CountA(Range("Favorites").EntireColum<nobr>n<wbr></nobr> ) + 1
Rem Range("FavoriteNum").Value = r
Rem Cells(r, Range("Favorites").Column) = Range("a_inc").Value
Rem Cells(r, Range("Favorites").Column + 1) = Range("b_inc").Value
Rem Cells(r, Range("Favorites").Column + 2) = Range("t_inc").Value
Rem Application.Calculation = xlCalculationAutomatic
Rem Application.ScreenUpdating = True
Rem End If
Rem End Sub
Rem
Rem
Rem
Rem
Rem
Rem Sub InfoButton_Click()
Rem ChartIsAnimated = False
Rem Sheets("Info").Activate
Rem Range("A2").Select
Rem End Sub
Rem
Rem Sub ReturnButton_Click()
Rem Sheets("Chart").Activate
Rem Range("E4").Select
Rem End Sub
Rem
End Sub

#

Return to OpenOffice.org Calc adds support for Excel VBA