Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default urgent help needed please anyone

hello everyone as iam new to VB i have a small query which iam trying
to solve.
I have designed a form with three check boxes and one texbox which is
connected to a column in a table.

when i check one of the check boxes or all of them i want to copy the
checkbox label text to the textbox to store in the table. to achieve
this i defined a string in the on click event procedure of the CLOSE
Button on the form.

If i use this string in the on-click event procedure of the check box
its giving me this error "RUNTIME ERROR 2115". Thts the Reason i used
the string in the CLOSE command button (which doesnt give any runtime
error).

The problem comes when i click all the three check boxes the textbox is
only storing the recent value. but not all the three values. I have
attached the code please go through the string i have written in the
CLOSE Button event Procedure.

Comments.SetFocus
Dim options As String
options = Comments.Text
If chkCoverstory.Value = True Then
Comments.Text = Label3.Caption & options
If ChkNews.Value = True Then
Comments.Text = Label5.Caption & options
If ChkRegulars.Value = True Then
Comments.Text = Label7.Caption & options
End If

Any help is greatly appreciated. Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default urgent help needed please anyone

Try:

Dim options As String

options = ""
If ChkCoverstory Then options = Label3.Caption
If ChkNews Then options = Label5.Caption & options
If ChkRegulars Then options = Label7.Caption & options
Comments.Text = options & Comments.Text


"Newbee" wrote:

hello everyone as iam new to VB i have a small query which iam trying
to solve.
I have designed a form with three check boxes and one texbox which is
connected to a column in a table.

when i check one of the check boxes or all of them i want to copy the
checkbox label text to the textbox to store in the table. to achieve
this i defined a string in the on click event procedure of the CLOSE
Button on the form.

If i use this string in the on-click event procedure of the check box
its giving me this error "RUNTIME ERROR 2115". Thts the Reason i used
the string in the CLOSE command button (which doesnt give any runtime
error).

The problem comes when i click all the three check boxes the textbox is
only storing the recent value. but not all the three values. I have
attached the code please go through the string i have written in the
CLOSE Button event Procedure.

Comments.SetFocus
Dim options As String
options = Comments.Text
If chkCoverstory.Value = True Then
Comments.Text = Label3.Caption & options
If ChkNews.Value = True Then
Comments.Text = Label5.Caption & options
If ChkRegulars.Value = True Then
Comments.Text = Label7.Caption & options
End If

Any help is greatly appreciated. Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default urgent help needed please anyone

hi charlie,

Thanks for the reply it works only when i click all the check boxes
when i click only one checkbox then it gives me a runtime error 4 '
Invalid use of null'. any suggestions.

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
Urgent help needed Excel Helps Excel Worksheet Functions 13 January 21st 08 03:50 PM
Urgent Help Needed please barkiny Excel Worksheet Functions 3 May 8th 06 04:36 PM
URGENT, help needed. John Keith[_2_] Excel Programming 2 February 8th 06 10:22 PM
Urgent help needed! skarbanan Excel Worksheet Functions 23 December 30th 05 10:56 PM
Urgent Help needed ! sameer27p[_10_] Excel Programming 2 July 20th 04 09:06 PM


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