Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9080969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:12:06+00:00 2026-06-16T20:12:06+00:00

So I created this code (probably don’t even have to show it- but just

  • 0

So I created this code (probably don’t even have to show it- but just in case!), have not been able to test it as I get “User defined type not defined” on the first line. I saw that I should set the reference in Tools>References but
the option is grayed out….

Sub UploadDistributors()
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnn = New ADODB.Connection
Set rs = New ADODB.Recordset

strConn = "Provider=SQLOLEDB-Removed for security-Network Library=DBMSSOCN"

cnn.Open strConn 

Dim k
k = 0

   For i = 1 To 352

   sSQL = "INSERT INTO DistributorsNP (CompanyName, address, city, state, zip, phone,    tollfree) VALUES ("

    'CompanyName
    sSQL = sSQL & Sheet1.Range("B" & i).Value & ","
    'address
    sSQL = sSQL & Sheet1.Range("C" & i).Value & ","
    'city
    sSQL = sSQL & Sheet1.Range("D" & i).Value & ","
    'state
    sSQL = sSQL & Sheet1.Range("E" & i).Value & ","
    'zip
    sSQL = sSQL & Sheet1.Range("F" & i).Value & ","
    'phone
    sSQL = sSQL & Sheet1.Range("G" & i).Value & ","
    'tollfree
    sSQL = sSQL & Sheet1.Range("H" & i).Value & ","



sSQL = sSQL & ")"
rs.Open sSQL, cnn, adOpenStatic, adLockReadOnly, adCmdText

rs.Close

Next

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:12:07+00:00Added an answer on June 16, 2026 at 8:12 pm

    Guessing you’ve pressed stop in the editor and are no longer in break mode…?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a mobile app using Phonegap Build (not just Phonegap...but Build ).
I have created this Fiddle with this code: This is my problem I want
I have an array created with this code: var widthRange = new Array(); widthRange[46]
I have made this code to open a database(created in SQLite browser) stored in
I do not think this is a duplicate. I have done some reading but
I know this question has already been asked a lot, but I don't get
I've created this code, it is supposed to use wordpress metabox functionality to save
I've created this code branch so that if the permalink settings do no match
I created a class under 'src' dir. I'm using this code to access the
I'm using Drupal 7. And i created a block and embed this code: $contents

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.