+ Reply to Thread
Results 1 to 4 of 4

creating macro to combine a dbf and create a wdp file

  1. #1
    Registered User
    Join Date
    08-01-2023
    Location
    The Netherlands
    MS-Off Ver
    2023
    Posts
    2

    creating macro to combine a dbf and create a wdp file

    Hi all, I need some help with creating a macro and hope to find someone who is able to assist me.

    I have an old dbf file with a lot of info in it, this info is also in a lot of AutoCAD Drawings in some attributes. I must create a wdp file now, thats for AutoCAD Electrical, this file must contain also som information that was in the past in the old dbf. (this dbf file is copied into the tab "PLANOS"

    I wrote some info below that must be done in the excel file. I created also a macro but that results in doing the same again and again....?

    Starting tab "Projectsettings" cell A114 must be placed a "'=" and behind a value thats in the tab "PLANOS"
    On the next row A115 must be placed the value "'=="
    On the next row A116 must be placed the value "'===" and behind a value thats in the tab "PLANOS" column LUGAR ( AC2)
    On the next row A117 must be placed the value "'===" and behind a value thats in the tab "PLANOS" column DISPOS( AB2)
    On the next row A118 must be placed the value "'===" and behind a value thats in the tab "PLANOS" column OBS1( R2)
    On the next row A119 must be placed the value "'===" and behind a value thats in the tab "PLANOS" column OBS2( S2)
    On the next row A120 must be placed the value "'===" and behind a value thats in the tab "PLANOS" column NAME( B2) followed with ".dwg"
    The macro must run on every row until the value in the column Name is empty

    see also attached xlsx file

    Hans
    Attached Files Attached Files
    Last edited by jcjk; 08-01-2023 at 08:58 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: creating macro to combine a dbf and create a wdp file

    This should work for you. I don't know why you started in row 114. I started in row 2 for the purposes of testing. You can change the start row in the code:

    Please Login or Register  to view this content.
    Also I assumed you wanted the generated data on the wdp sheet. Clear out the test data and copy in whatever header rows you need.

    Also, I had to format column A as text, otherwise Excel was trying to interpret those equal signs as the start of a formula.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: creating macro to combine a dbf and create a wdp file

    jcjk,

    try
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-01-2023
    Location
    The Netherlands
    MS-Off Ver
    2023
    Posts
    2

    Re: creating macro to combine a dbf and create a wdp file

    Thanks a lot, I will try it out one of those days. Was starting on line 114 because on the rows before it are settings for the AutoCAD Electrical project
    Hans

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Trying to combine cells to create a file name but get error.
    By OmegaSea in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-09-2015, 05:24 PM
  2. [SOLVED] Macro to combine a Text File & Excel file into one Separate workbook
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2014, 03:42 PM
  3. Macro to combine a Text File & Excel file into one Separate workbook
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2014, 03:23 AM
  4. [SOLVED] Creating a macro that will combine reports (excel files) into one
    By soupi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-02-2014, 09:24 PM
  5. [SOLVED] Need to create a macro that will combine 2 other macros plus
    By rjackson104 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 02:45 AM
  6. Replies: 2
    Last Post: 10-12-2012, 07:46 AM
  7. Replies: 3
    Last Post: 09-30-2011, 04:35 AM

Tags for this Thread

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