Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
neilb514 - 04 Dec 2007 14:03 GMT
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
Mike H - 04 Dec 2007 14:19 GMT
Hi,

C14 is derived from the value in F2 and If it isn't displaying correctly
first time then I doubt if this macro causing it.

P.S. I'm glad that in other respects it's working, thanks for the feedback!

Mike

> hi
> I have been running the following macro and it works fine except i have to
[quoted text clipped - 26 lines]
>
> End Sub
Don Guillett - 04 Dec 2007 17:02 GMT
Didn't like mine, huh?

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> hi
> I have been running the following macro and it works fine except i have to
[quoted text clipped - 27 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.