VBA Conversion Question

JHaugh

New Member
Joined
Nov 12, 2013
Messages
15
Not sure if this is the right section or even the right forum for this question but I hope someone here can help. I am in the process of moving a very useful Excel document that I created to Google Doc's. The problem is that it is useful because of the VBA Macros that I have built in it and of course Google doesn't use VBA Script.

I believe it's possible to convert them all to javascript and not lose any functionality but I don't know if anyone on these boards knows anything about javascript or where I could go to find out more info. Here is an example of one of the scripts I use

Code:
Private Sub ToggleButton1_Click()    ActiveSheet.Unprotect
    If ToggleButton1.Value = True Then
        For i = 1 To Range("SName").Rows.Count
            For j = 1 To Range("SName").Columns.Count
                With Range("SName").Item(i, j)
                    If .Value = 0 And .Value <> "" Then
                        .EntireRow.Hidden = True    'hide row
                        Exit For    'next row
                    End If
                End With
            Next j      'next col
        Next i          'next row
    Else    'toggle is false
        ' Unhide all rows in range
        Range("SName").EntireRow.Hidden = False
    End If
    ActiveSheet.Protect
End Sub

I'm just not used to javascript unfortunately.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top