Run time error 438 object doesnt support this property or method

vbacoder12

New Member
Joined
Sep 4, 2024
Messages
41
Office Version
  1. 2024
  2. Prefer Not To Say
Platform
  1. Windows
Hi ,
I cannot copy my code into the message at this time. I am going to type n i really apologize. When using code I get the error in the subject. Also it puts the table in a style which is not in the code. Debug highlights set tbl line. Which starts set tbl and ends at 21) if this is too hard to read it can upload image. If I can

Sub FormatATable()
Dim tbl As ListObject
Dim rng As Range
Set rng = Range("A6") Settbl=ActiveSheet.ListObjects.Add(xlSrcRange, Range("A6:Q9000"), , xlYes).Header = No.TableStyle=Green Table Style Medium 21)
End Sub
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
That is the only way I have been able to replicate what you are getting.
Select A6, then Ctrl+Shift+<Right Arrow>. Is only Row 6 selected or are multiple rows selected ?
 
Upvote 0

Forum statistics

Threads
1,225,743
Messages
6,186,770
Members
453,370
Latest member
juliewar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top