M
MEP
I am looking for some help please with an urgent problem.
I have limited knowledge of VBA but have written a spreadsheet for my
sister that we cannot get to work.
I made the mistake of using active x controls not realising these would
not work on her Mac. I use Windows XP with Excel 2000 and she uses
MACOS10 With xl for mac 2004.
I do not have access to a mac and we live on different continents so
testing is difficult.
This was the code I used for the two command buttons.
1- to copy preformatted columns from a hidden sheet
Private Sub NewColumn_Click()
Dim ColumnNo As Integer
Dim SourceRange As Range
Dim CurrentIndex As Integer
CurrentIndex = ActiveSheet.Index
ColumnNo = 26
Set CurrentCell = Worksheets(CurrentIndex).Cells(3, ColumnNo)
While CurrentCell.Value = "Year"
ColumnNo = ColumnNo + 21
Set CurrentCell = Worksheets(CurrentIndex).Cells(3, ColumnNo)
Wend
Set CurrentCell = Worksheets(CurrentIndex).Cells(1, ColumnNo)
Set DestRange = Worksheets(CurrentIndex).Columns(ColumnNo)
Set SourceRange = Worksheets("G3 Columns").Columns("A:U")
Worksheets(CurrentIndex).Unprotect
SourceRange.Copy DestRange
Worksheets(CurrentIndex).Protect
End Sub
2. To copy a presetup hidden sheet
Private Sub NewSheet_Click()
Worksheets("NewPage").Copy Before:=Worksheets("G3 Columns")
ActiveSheet.Name = "Grade 3 (" & Str(ActiveSheet.Index) & ")"
ActiveSheet.Protect
ActiveSheet.Visible = True
End Sub
Can any one tell me how to get these to work as macros on a mac. I have
tried with a button from the forms toolbar and attaching macros but no
macro I create seems to work on my sisters mac.
I have limited knowledge of VBA but have written a spreadsheet for my
sister that we cannot get to work.
I made the mistake of using active x controls not realising these would
not work on her Mac. I use Windows XP with Excel 2000 and she uses
MACOS10 With xl for mac 2004.
I do not have access to a mac and we live on different continents so
testing is difficult.
This was the code I used for the two command buttons.
1- to copy preformatted columns from a hidden sheet
Private Sub NewColumn_Click()
Dim ColumnNo As Integer
Dim SourceRange As Range
Dim CurrentIndex As Integer
CurrentIndex = ActiveSheet.Index
ColumnNo = 26
Set CurrentCell = Worksheets(CurrentIndex).Cells(3, ColumnNo)
While CurrentCell.Value = "Year"
ColumnNo = ColumnNo + 21
Set CurrentCell = Worksheets(CurrentIndex).Cells(3, ColumnNo)
Wend
Set CurrentCell = Worksheets(CurrentIndex).Cells(1, ColumnNo)
Set DestRange = Worksheets(CurrentIndex).Columns(ColumnNo)
Set SourceRange = Worksheets("G3 Columns").Columns("A:U")
Worksheets(CurrentIndex).Unprotect
SourceRange.Copy DestRange
Worksheets(CurrentIndex).Protect
End Sub
2. To copy a presetup hidden sheet
Private Sub NewSheet_Click()
Worksheets("NewPage").Copy Before:=Worksheets("G3 Columns")
ActiveSheet.Name = "Grade 3 (" & Str(ActiveSheet.Index) & ")"
ActiveSheet.Protect
ActiveSheet.Visible = True
End Sub
Can any one tell me how to get these to work as macros on a mac. I have
tried with a button from the forms toolbar and attaching macros but no
macro I create seems to work on my sisters mac.