object required error 424

Status
Not open for further replies.

adpatel

New Member
Joined
May 30, 2019
Messages
17
I have following vba code which throws error of object required error 424 please help me on this

Code:
[COLOR=#242729][FONT=Consolas]With Worksheets("OPTIONS").Activate.QueryTables.Add(Connection:= _ mystr, Destination:=ThisWorkbook.Worksheets("OPTIONS").Range("$A$1"))[/FONT][/COLOR]
any help will be appriciated by word of thanks
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,531
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Remove the .Activate part.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,531
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
It seems you have subsequently asked this same question elsewhere, so I'll close this to avoid anyone else wasting their time.
 
Status
Not open for further replies.

Forum statistics

Threads
1,085,309
Messages
5,382,873
Members
401,807
Latest member
xlWatcher

Some videos you may like

This Week's Hot Topics

Top