Closed Thread
Results 1 to 17 of 17

exporting data from excel into word

Hybrid View

pboost1 exporting data from excel... 06-02-2008, 05:29 PM
Leith Ross Hello pboost1, Yes you can... 06-02-2008, 06:13 PM
pboost1 Since the form and... 06-03-2008, 05:44 PM
Leith Ross Hello pboost1, I have a... 06-04-2008, 02:37 PM
pboost1 Sorry for the confusion. I... 06-04-2008, 03:15 PM
Leith Ross Hello pboost1, The... 06-05-2008, 09:28 PM
pboost1 Hello there, I tried the... 06-06-2008, 11:07 AM
Leith Ross Hello pboost1, Looks like... 06-06-2008, 11:17 AM
pboost1 Hello there, i did type it... 06-06-2008, 05:44 PM
Leith Ross Hello pboost1, Try... 06-06-2008, 07:48 PM
pboost1 I think i found out what I... 06-07-2008, 11:32 AM
Leith Ross Hello pboost1, I didn't... 06-07-2008, 01:14 PM
pboost1 Yes, please. I would like to... 06-09-2008, 09:45 AM
Leith Ross Hello pboost1, The... 06-09-2008, 05:14 PM
  1. #1
    Forum Contributor
    Join Date
    07-16-2004
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    122
    Hello there, i did type it wrong, but when I compared your line with the line that is in yellow, they appear to be the same. and I am still getting that error.

    Am I doing something wrong?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello pboost1,

    Try changing the declarations at the very top of the macro module. The code runs fine on my machine. Any variable declared in the General Declarations section of VBA module should be available to the entire VBA project. I used a Dim statement. So, to force it to be available to the project, change the Dim statements to public.

    Code Currently
      'Statements Before Change
       Dim xlApp As Object
       Dim xlWkb As Object
    Code Change
      'Statements After Change
       Public xlApp As Object
       Public xlWkb As Object
    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    07-16-2004
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    122
    I think i found out what I was doing wrong. i was opening the word document first, then excel. I tied opening excel and then word and that seems to work.

    I now have to figure out how to copy this for what I have at work. I have about 800 forms that I will need to have this work for.

    Again my programming skills are not the greatest. I will have to look at what you have and hopefully be able to copy it over.

    If I may ask one question, I see you are using the drop down box, which makes things easier than retyping the data, is there a way to have it auto fill without using the drop down box? If not, I thank you enough for all that you have done.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello pboost1,

    I didn't change the drop down boxes as they were part of the original form you sent me. It seemed more logical to have a single drop down for the Form Numbers and auto-fill the remaining sections. The other fields can be changed to auto-filled, but that means I will need to alter the macro as well. If that is what you want to do, I will need some time to make those changes. Let me know.

    Sincerely,
    Leith Ross

  5. #5
    Forum Contributor
    Join Date
    07-16-2004
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    122
    Yes, please. I would like to be able to enter the one data form number and have everything else autofill. If that could be done, that would be great. Thanks.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello pboost1,

    The attached Word document has been amended. It will now auto-fill the text on the template when you select a form number.

    Sincerely,
    Leith Ross
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    07-16-2004
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    122
    The sample works great. I thank you very much. I just need to adapt what you have given to what I have at work. Thank you again.

    Would you be willing to explain how you did this? If you don't want to or feel comfortable, I definitely understand. You have helped out a lot with all that you have done. Thank you again.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1