+ Reply to Thread
Results 1 to 6 of 6

Using Word VBA to write a variable at end of Excel Column

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    Waldheim, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    11

    Using Word VBA to write a variable at end of Excel Column

    FROM WORD, I'm trying to drop in a value at the end of an Excel Column.

    I can get to the end of the column, but can't find the code to offset the data by one into the next blank cell.

    To do that the piece of my code is as follows:


    "ActiveCell" commands throw an error to the Word Macro.

    Please Login or Register  to view this content.
    I've spent way too much time looking for a solution

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation Re: Using Word VBA to write a variable at end of Excel Column


    Try removing Activate & Select ! …

    No need Select to update a cell : .Range("B3").End(xlDown)(2).Value =
    Last edited by Marc L; 07-21-2014 at 10:01 AM.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using Word VBA to write a variable at end of Excel Column

    What value are you trying to put in the column?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    11-01-2012
    Location
    Waldheim, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Using Word VBA to write a variable at end of Excel Column

    Awesome -- again my limited knowledge cost me time.
    I didn't know you could throw in the (2) at the end of xlDown.

    This worked perfect!!! MUCH THANKS to you Marc L
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using Word VBA to write a variable at end of Excel Column

    You could also use Offset.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-01-2012
    Location
    Waldheim, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Using Word VBA to write a variable at end of Excel Column

    That's cool as well. I tried the offset, but I'm not entirely clear on the order of syntax for some of these operations.
    Thanks Norie.

+ 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. Need help to write a macro to search for a word or number in a column
    By mhill10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2014, 02:31 AM
  2. Replies: 5
    Last Post: 08-28-2013, 02:16 PM
  3. [SOLVED] How can I write in Excel as if it were Word?
    By zpenacho in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-13-2012, 04:05 PM
  4. Macro to write Vlookup formula with variable column index
    By Ashali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2012, 09:40 PM
  5. seach specific word in column & write something different in next column
    By canada123 in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 02-05-2010, 05:09 PM

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