How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • Go back-and-forth until satisfied
    Rate the answer you receive.
Ask Bing Your Own Question
Bing
Bing, Programming Tutor
Category: Programming
Satisfied Customers: 6139
Experience:  Microsoft Certified Solution Developer
96068672
Type Your Programming Question Here...
Bing is online now

I am getting a run time error on VBA- command set was not

Customer Question

Hi I am getting a run time error on VBA- command set was not set for the command object
Submitted: 11 days ago.
Category: Programming
Expert:  Mark W replied 11 days ago.

Hi there,

What is the VBA command you are trying to set?

Regards

Customer: replied 11 days ago.
please see attached
Expert:  Mark W replied 11 days ago.

And how are you connecting to the SQL database, e.g. are you using ADO? If so, have you added the library, e.g. https://analysistabs.com/excel-vba/ado-sql-macros-connecting-database/

Regards

Customer: replied 11 days ago.
using ADO,
yup I've added the library also
Expert:  Mark W replied 11 days ago.

Ok, I'll opt out and let an expert who is more familiar with this subject help you. You don't need to repeat any information, they will be able to see the conversation.

Expert:  Bing replied 11 days ago.

Hello and welcome to JustAnswer, an independent technical support website. My name is ***** ***** it’s my pleasure to be assisting you today.

Can I see a screenshot showing how the original symptom looks like from your side?

Customer: replied 11 days ago.
hi bing spoke to you last night, please see attached new error
Expert:  Bing replied 11 days ago.

Nice to meet you again. Do you mean it is the same issue?

Customer: replied 11 days ago.
no different issue now, first problem seems to be fixed
Expert:  Bing replied 11 days ago.

Okay, what's the new issue?

Customer: replied 11 days ago.
now getting the run time error- command set was not set for the command object
Expert:  Bing replied 11 days ago.

The same principle, please first use print or msgbox to see the values of related variables, then you can know why.

Expert:  Bing replied 10 days ago.

As no further input gathered against my last clarifying question, I have provided a general answer based on the given description and common situations. For the additional matters, please kindly ask a new question to address it. Thanks.