LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Change syntax - form button instead of command button

Check your later post.

Ben in CA wrote:

Hi Per,

Do you know how I would modify this so it could be done from a form button
instead of a command button?

(It's really useful already, but now I'm thinking it should have been a form
button.)

Also, is there any way that it could automatically replace (not ask) if the
value of C33 is 0 (zero)?

Private Sub CommandButton1_Click()

If Range("W6").Value < "" And Range("W6").Value < 0 Then
If Sheets("Quick Calculator").Range("C33").Value < "" Then
answer = MsgBox("Do you want to replace existing value for Trade
1?", vbYesNo)
If answer = vbYes Then Sheets("Quick Calculator").Range("C33") =
Me.Range("W6").Value
Else
Sheets("Quick Calculator").Range("C33") = Me.Range("W6").Value
End If
End If

End Sub

Thanks Per! - you've been a great help!

(please take no offense - in case you aren't notified of replies, I'll
re-post this as a new topic.)

"Per Jessen" wrote:

Hi Ben

Thanks for your reply. I'm glad to help.

Regards,
Per

"Ben in CA" skrev i meddelelsen
...
Hi Per,

Incredible - thanks so much!

Thanks for the super quick and super useful reply!

Ben




--

Dave Peterson
 
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
WorkSheet Change Event - Need Help With Coding Syntax BJ Excel Programming 2 September 19th 08 08:31 PM
Color Change Syntax Minitman Excel Programming 2 May 21st 08 08:47 PM
Syntax-Change? Peter Ostermann Excel Programming 4 January 27th 07 04:52 PM
syntax for relative cell change and looping BwanaP Excel Programming 1 September 27th 03 03:36 PM
Change hard code to Variable syntax Bob Phillips[_5_] Excel Programming 0 September 13th 03 07:32 AM


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