View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] twlove@ontuet.com is offline
external usenet poster
 
Posts: 8
Default Command button code does not execute

I have a command button that when clicked is supposed to multiple the
value in R33 by 115% if cell N8 = Yes and by 130% if cell N8 = No.

What's wrong with my code?

******


Public Sub Calc_Freight()

Dim Assembly As String

Assembly = Range("N8")

Application.ScreenUpdating = False
Application.ActiveSheet.Range("R33").Select
Application.ScreenUpdating = True

Select Case ("Assembly")

Case "No"

For Each cell In Selection
cell.Value = cell.Value * 1.3
Next

Case "Yes"
For Each cell In Selection
cell.Value = cell.Value * 1.15
Next

End Select

End Sub