Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Display VB code result in cell instead of message box?

dim myCBoxes as long
myCBoxes = -1 * (CheckBox1 + CheckBox2 + CheckBox3 + CheckBox4)
Range("A1").value = myCBoxes

Another way without code way would be to assign the linkedCell property of
each checkbox to a cell, lets say A1:A4 respectively, and sum them

=SUM(--(A1:A4)) array entered

or not array entered
=SUMPRODUCT(--(A1:A4))

Regards,
Peter T


"Leigh Douglass" wrote in message
...
Is it possible to get the result of the code below to show in a cell on my
spreadsheet instead of displaying in a message box?

Thanks
Leigh

Private Sub GetResult()
' counter
MsgBox -1 * (CheckBox1 + CheckBox2 + CheckBox3 + CheckBox4)
' binary encoded
MsgBox -1 * (CheckBox1 + CheckBox2 + CheckBox3 + CheckBox4)
End Sub



Reply
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
Display VB code result in cell instead of message box? Jacob Skaria Excel Programming 0 May 7th 09 05:42 PM
display message while code is running Bassman62 Excel Programming 5 November 10th 08 09:15 PM
Display message box after each line of code? manxman Excel Programming 2 April 26th 06 06:02 PM
Use VBA code to display message if combobox selection not in list hurlbut777 Excel Programming 4 December 30th 05 12:36 AM
UserForm - display text message then run code Robert[_13_] Excel Programming 3 September 13th 03 11:37 AM


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

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

About Us

"It's about Microsoft Excel"