Thread: object required
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default object required

hi
what is txtheading.text?
sound like a textbox from a form.
also txtheading.activate......sounds like it's trying to activate the
form/textbox?
anyway txtheading is the object that vb needs/can't identfy.

regards
FSt1

"kyle" wrote:


i copied this from a book. i run the macro and it says object required.
what's up?

Private Sub cmdinsertheading_click()
Cells(1, "d").Value = txtheading.Text
Cells(1, "d").Select

With Selection
.Font.Bold = True
.Font.Name = "arial"
.Font.Size = 72
.Font.Color = RGB(0, 0, 255)
.Columns.AutoFit
.Interior.Color = RGB(0, 255, 255)
.Borders.Weight = xlThick
.Borders.Color = RGB(0, 0, 255)
End With

txtheading.Activate

End Sub