K
Karen53
Hi,
I am getting an error 13: Type Mismatch and don't understand why. Would
someone clarify this for me?
Sub SaveItems(AmountCol, Choice, ItemAmount)
Dim ws As Worksheet
Set ws = Tablespg
With ws
With .Range(AmountCol & Choice)
.Value = Val(ItemAmount)
.NumberFormat = "_(* #,##0.00_);_(* (#,##0.00);_(* " -
"??_);_(@_)"
End With
End With
End Sub
The error occurs at the .NumberFormat statement. ItemAmount is a value
obtained from a textbox then converted to a number in the .Value statement.
I am getting an error 13: Type Mismatch and don't understand why. Would
someone clarify this for me?
Sub SaveItems(AmountCol, Choice, ItemAmount)
Dim ws As Worksheet
Set ws = Tablespg
With ws
With .Range(AmountCol & Choice)
.Value = Val(ItemAmount)
.NumberFormat = "_(* #,##0.00_);_(* (#,##0.00);_(* " -
"??_);_(@_)"
End With
End With
End Sub
The error occurs at the .NumberFormat statement. ItemAmount is a value
obtained from a textbox then converted to a number in the .Value statement.