Adding text to a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Hi Frank,

thanks for your help but the error now changed to "object variable or With block variable not set"...
 
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top