LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command button code taps54 Excel Programming 3 September 21st 06 01:16 PM
Macro won't execute from a Command Button Dick Scheibe[_2_] Excel Programming 8 August 21st 05 12:16 AM
How do I execute command from button or hyperlink? rerhart Excel Discussion (Misc queries) 1 February 18th 05 09:41 PM
Command button - won't execute twice in sequence L Mehl Excel Programming 6 October 15th 04 07:45 PM
Programming command button to execute on a different worksheet Ed[_21_] Excel Programming 4 July 29th 04 12:17 AM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"