Thread: object required
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Kyle Kyle is offline
external usenet poster
 
Posts: 66
Default object required


something still isn't right. i put this in the code

Set txtheading = Range("m17")

and what i type in m17 will appear in column d for a split second then
dissappear



"JLGWhiz" wrote:

Also, the use of the Cells property requires a qualified sheet reference if
the code is not in a sheet code module. It is a good practice to always
qualify cells property to be sure the range object on the correct sheet is
acted upon.


\
"kyle" wrote in message
...

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



.