Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Adding text to a cell

Hi,

I have the following code in my project, but it doesn't work:

mLab = MsgBox("Does it include labeling?", vbYesNo, "Labeling")
If mLab = 6 Then ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of mor than one person to complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then ActiveCell.Phonetic.Add Start:=1, Length:=11, Text:=", Cooperation"

In case both answers are Yes I should end with "Labeling, Cooperation" in my cell. Although the first part works and I get the "Labeling" when applying the Add method it returns Run-time error '438': Object doesn't support this property or method.

Any ideas on how I should do this?

Thank you very much.

Regards,
Khlaudhya

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Adding text to a cell

If mLab = 6 then activecell.formular1c1 = "Labeling?"
end if
Acivecell.value might work too.
this code works for
-----Original Message-----
Hi,

I have the following code in my project, but it doesn't

work:

mLab = MsgBox("Does it include labeling?",

vbYesNo, "Labeling")
If mLab = 6 Then ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of mor than one

person to complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then

ActiveCell.Phonetic.Add Start:=1, Length:=11, Text:=",
Cooperation"

In case both answers are Yes I should end with "Labeling,

Cooperation" in my cell. Although the first part works and
I get the "Labeling" when applying the Add method it
returns Run-time error '438': Object doesn't support this
property or method.

Any ideas on how I should do this?

Thank you very much.

Regards,
Khlaudhya

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Adding text to a cell

Hi Frank,

thanks for your help but the error now changed to "object variable or With block variable not set"...

"Frank Stone" wrote:

If mLab = 6 then activecell.formular1c1 = "Labeling?"
end if
Acivecell.value might work too.
this code works for
-----Original Message-----
Hi,

I have the following code in my project, but it doesn't

work:

mLab = MsgBox("Does it include labeling?",

vbYesNo, "Labeling")
If mLab = 6 Then ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of mor than one

person to complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then

ActiveCell.Phonetic.Add Start:=1, Length:=11, Text:=",
Cooperation"

In case both answers are Yes I should end with "Labeling,

Cooperation" in my cell. Although the first part works and
I get the "Labeling" when applying the Add method it
returns Run-time error '438': Object doesn't support this
property or method.

Any ideas on how I should do this?

Thank you very much.

Regards,
Khlaudhya

.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding text to a cell

mLab = MsgBox("Does it include labeling?", vbYesNo, "Labeling")
If mLab = 6 Then
ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of morr than " & _
"one person to complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then _
ActiveCell.Value = ActiveCell.Value & ", Cooperation"
End if

--
Regards,
Tom Ogilvy



"Khlaudhya" wrote in message
...
Hi,

I have the following code in my project, but it doesn't work:

mLab = MsgBox("Does it include labeling?", vbYesNo, "Labeling")
If mLab = 6 Then ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of mor than one person to

complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then

ActiveCell.Phonetic.Add Start:=1, Length:=11, Text:=", Cooperation"

In case both answers are Yes I should end with "Labeling, Cooperation" in

my cell. Although the first part works and I get the "Labeling" when
applying the Add method it returns Run-time error '438': Object doesn't
support this property or method.

Any ideas on how I should do this?

Thank you very much.

Regards,
Khlaudhya



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Adding text to a cell

Thank you very much. This solved it.

regards,
Khlaudhya

"Tom Ogilvy" wrote:

mLab = MsgBox("Does it include labeling?", vbYesNo, "Labeling")
If mLab = 6 Then
ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of morr than " & _
"one person to complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then _
ActiveCell.Value = ActiveCell.Value & ", Cooperation"
End if

--
Regards,
Tom Ogilvy



"Khlaudhya" wrote in message
...
Hi,

I have the following code in my project, but it doesn't work:

mLab = MsgBox("Does it include labeling?", vbYesNo, "Labeling")
If mLab = 6 Then ActiveCell = "Labeling"

mCoo = MsgBox("Does it needs the work of mor than one person to

complete the job?", vbYesNo, "Cooperation")
If mCoo = 6 And Len(Range("includes")) 0 Then

ActiveCell.Phonetic.Add Start:=1, Length:=11, Text:=", Cooperation"

In case both answers are Yes I should end with "Labeling, Cooperation" in

my cell. Although the first part works and I get the "Labeling" when
applying the Add method it returns Run-time error '438': Object doesn't
support this property or method.

Any ideas on how I should do this?

Thank you very much.

Regards,
Khlaudhya




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
Adding Text if Value of Cell = 0 MrMeth Excel Worksheet Functions 2 February 23rd 11 04:06 PM
Adding text to cell Grugs Excel Worksheet Functions 5 July 16th 09 04:55 AM
Adding Cell Range with Text JohnHill Excel Worksheet Functions 2 August 1st 05 03:30 AM
adding text to end of cell bubba1965[_6_] Excel Programming 0 February 25th 04 03:47 PM
Adding text to a cell David Excel Programming 2 August 19th 03 09:29 PM


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