Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default macros

hi
I have been running the following macro and it works fine except i have to
push button 6 twice to get it to recalculate and display the correct number
in cell c14. can anyone tell me why and how to fix this annoyance.

Sub Button6_Click()

Range("c12") = Range("c12") + Range("d8")
If IsNumeric(Range("F2").Value) Then
Select Case Range("F2").Value
Case Is <= 1
myvalue = 1
Case Is <= 2
myvalue = 2
Case Is <= 3
myvalue = 3
Case Is <= 4
myvalue = 4
Case Else
myvalue = 5
End Select
Range("C14").Value = myvalue

End If


Range("c18") = Range("c18") + Range("d7")

Range("A8,b8,b7,c8") = 0


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
Macros - copying macros from one computer to another TT Excel Discussion (Misc queries) 18 December 14th 06 03:24 AM
"openinf file..."ENABLE MACROS...DISABLE MACROS" F. Lawrence Kulchar Excel Discussion (Misc queries) 3 September 12th 06 10:33 AM
two macros daidipya Excel Discussion (Misc queries) 1 June 2nd 06 07:12 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
Macros Nimesh Shastri New Users to Excel 1 December 22nd 05 11:05 AM


All times are GMT +1. The time now is 08:01 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"