Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write a macro to copy the format in the current cell and apply
it to all cells in the book that are currently formated as a currency. Any idea of why the below is not working? Sub CurrencyCopy() Dim rng As Range Dim format As String format = ActiveCell.NumberFormat Msg = "This will reformat all cells currently containing a currency format. Are you sure you wish to proceed?" Ans = MsgBox(Msg, vbYesNo) If Ans = vbYes Then Set rng = ActiveSheet.UsedRange For Each cell In rng If VarType(cell) = vbCurrency Then ActiveCell.NumberFormat = format End If Next cell End If ' End Sub Thanks for the help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to add new currency Symbol in Format/Cell/Currency | Excel Discussion (Misc queries) | |||
How to format cells in Excel 2007 (i.e. currency format)? | Excel Discussion (Misc queries) | |||
format cells for currency 2450 and have it format to $24.50? | Excel Worksheet Functions | |||
why does currency format change to number format? | Excel Discussion (Misc queries) | |||
Conversion from currency value to currency text format | Excel Programming |