Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default CODE FOR CHECK BOXES, AND EXCEL AS ATTACHMENT !

2 questions:
(1) I have created a check box in a worksheet using the visual basic
toolbar (not forms). I need a code to assign to the check box such that
when clicked on, the check box displays "X" instead of a check mark, and
when clicked on again it displays nothing. In other words when clicked
on, the check box should toggle between "X" and not showing anything.

(2) I need a code that will attach the current workbook (say
WorkbookA.xls) as an e-mail attachment. I use microsoft outlook. The
"TO:" field of the e-mail should contain two addresses like
" and " and the subject line of the e-mail
should contain a subject like "Hello World!". The body of the e-mail
should contain a message like "Thank you for your participation". All of
the above must be done automatically.
Any help would be greatly appreciated. Thanks in advance!
Jay Dean


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default CODE FOR CHECK BOXES, AND EXCEL AS ATTACHMENT !

Hi
for your second question see:
http://www.rondebruin.nl/sendmail.htm

--
Regards
Frank Kabel
Frankfurt, Germany


jay dean wrote:
2 questions:
(1) I have created a check box in a worksheet using the visual basic
toolbar (not forms). I need a code to assign to the check box such
that when clicked on, the check box displays "X" instead of a check
mark, and when clicked on again it displays nothing. In other words
when clicked on, the check box should toggle between "X" and not
showing anything.

(2) I need a code that will attach the current workbook (say
WorkbookA.xls) as an e-mail attachment. I use microsoft outlook. The
"TO:" field of the e-mail should contain two addresses like
" and " and the subject line of the
e-mail should contain a subject like "Hello World!". The body of the
e-mail should contain a message like "Thank you for your
participation". All of the above must be done automatically.
Any help would be greatly appreciated. Thanks in advance!
Jay Dean


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default CODE FOR CHECK BOXES, AND EXCEL AS ATTACHMENT !

Jay,

Frank Kabel has given you an excellent site for sending emails.

Now for the check box...
Instead of using a check box - use a change event. You can add formatting
and other stuff...

This will work when $A$1 is selected.
'''''''''''''''''''
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Len(Target) = 0 Then
Target.Formula = "X"
Else: Target.ClearContents
End If
End If
End Sub
'''''''''''''''''
And this one will work when $A$1 is double clicked
''''''''''''''''
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Address = "$A$1" Then
If Len(Target) = 0 Then
Target.Formula = "X"
Else: Target.ClearContents
End If
End If
Target.Offset(1, 0).Activate
End Sub
'''''''''''''''''''''''
hth
--

steveB

(Remove 'NOSPAM' from email address if contacting me direct)


"jay dean" wrote in message
...
2 questions:
(1) I have created a check box in a worksheet using the visual basic
toolbar (not forms). I need a code to assign to the check box such that
when clicked on, the check box displays "X" instead of a check mark, and
when clicked on again it displays nothing. In other words when clicked
on, the check box should toggle between "X" and not showing anything.

(2) I need a code that will attach the current workbook (say
WorkbookA.xls) as an e-mail attachment. I use microsoft outlook. The
"TO:" field of the e-mail should contain two addresses like
" and " and the subject line of the e-mail
should contain a subject like "Hello World!". The body of the e-mail
should contain a message like "Thank you for your participation". All of
the above must be done automatically.
Any help would be greatly appreciated. Thanks in advance!
Jay Dean


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default CODE FOR CHECK BOXES, AND EXCEL AS ATTACHMENT !


Thanks Steve and Frank for all your help.
I have one more question on the check box issue. It is for a survey so I
will need to create more check boxes. If I create check boxes using the
VB Toolbar (not forms) in my sheet, do they need extra coding to be
assigned for the check sign to toggle?
Thanks.

Jay Dean

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
VBA code for the Check Boxes in a form HKS Excel Discussion (Misc queries) 3 June 24th 08 09:42 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
Code for many check boxes Bob Excel Programming 5 January 24th 04 03:48 AM
Code for Many check boxes Bob Excel Programming 0 January 23rd 04 02:16 AM
code to hide check boxes Matt Excel Programming 4 January 10th 04 06:31 PM


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