Hi guys!
I am trying to make my very first Excel macro and I have hit a snag. My background is Java, and this my first venture into anything VB or VB like...
I have a workbook with multiple sheets. I need to copy it all to a new workbook with exception of the excel formulas - just the values, number formatting, background colours etc.
The code I have so far does that, but only for the active sheet - can you help me out with looping through the rest?
So far I have the following code working:
[VBA]
Sub test()
Cells.Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.Dialogs(xlDialogSaveAs).Show
End Sub
[/VBA]
Can you guys help me with the loop?
I am trying to make my very first Excel macro and I have hit a snag. My background is Java, and this my first venture into anything VB or VB like...
I have a workbook with multiple sheets. I need to copy it all to a new workbook with exception of the excel formulas - just the values, number formatting, background colours etc.
The code I have so far does that, but only for the active sheet - can you help me out with looping through the rest?
So far I have the following code working:
[VBA]
Sub test()
Cells.Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.Dialogs(xlDialogSaveAs).Show
End Sub
[/VBA]
Can you guys help me with the loop?