+ Reply to Thread
Results 1 to 4 of 4

Input information into another workbook on next available row

Hybrid View

ks100 Input information into... 12-13-2013, 03:43 PM
JOHN H. DAVIS Re: Input information into... 12-13-2013, 04:05 PM
ks100 Re: Input information into... 12-13-2013, 04:40 PM
JOHN H. DAVIS Re: Input information into... 12-13-2013, 05:04 PM
  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Input information into another workbook on next available row

    What I have so far:

    Dim curWorkbook As Workbook
    Set curWorkbook = ActiveWorkbook
    Workbooks.Open "C:\logs\logbook.xls"
    Workbooks("logbook.xls").Activate

    What I need it to do is input information into columns A - C, using the next available row.

    Basically it needs to open logbook.xls and do the following:


    Take todays date and copy its value into A(whatever the next available row is) in logbook.xls
    Take the filename of curWorkbook (minus its file extension) and copy its value into B(whatever the next available row is) in logbook.xls
    Take the value of cell AM3 in curWorkbook and copy its value into C(whatever the next available row is) in logbook.xls

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Input information into another workbook on next available row

    Maybe:

    Sub ks100zz()
    Dim curWorkbook As Workbook
    Set curWorkbook = ActiveWorkbook
    Workbooks.Open "C:\logs\logbook.xls"
    Workbooks("logbook.xls").Activate
    ActiveWorkbook.Sheets("Sheet1").Range("A" & Rows.count).End(3)(2).Value = Date
    ActiveWorkbook.Sheets("Sheet1").Range("B" & Rows.count).End(3)(2).Value = Left(curWorkbook.Name, Len(curWorkbook.Name) - 4)
    ActiveWorkbook.Sheets("Sheet1").Range("C" & Rows.count).End(3)(2).Value = curWorkbook.Sheets("Sheet1").Range("AM3").Value
    End Sub
    I used Sheet1 for both, you'll have too change the actual sheet names if they are different.

  3. #3
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Re: Input information into another workbook on next available row

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Sub ks100zz()
    Dim curWorkbook As Workbook
    Set curWorkbook = ActiveWorkbook
    Workbooks.Open "C:\logs\logbook.xls"
    Workbooks("logbook.xls").Activate
    ActiveWorkbook.Sheets("Sheet1").Range("A" & Rows.count).End(3)(2).Value = Date
    ActiveWorkbook.Sheets("Sheet1").Range("B" & Rows.count).End(3)(2).Value = Left(curWorkbook.Name, Len(curWorkbook.Name) - 4)
    ActiveWorkbook.Sheets("Sheet1").Range("C" & Rows.count).End(3)(2).Value = curWorkbook.Sheets("Sheet1").Range("AM3").Value
    End Sub
    I used Sheet1 for both, you'll have too change the actual sheet names if they are different.
    Worked great, thanks. Is there any way to get it to do one more column and pull the data needed for the column from the documents sharepoint properties? I know the command to edit a sharepoint property is :

    ActiveWorkbook.ContentTypeProperties("NameOfProperty").Value =
    But how would I tell Excel to take the value of "NameOfProperty" and then following our sequence, put it in column D?

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Input information into another workbook on next available row

    I'm afraid I'm not familiar with Sharepoint.

+ 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] Userform to input information into cells
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2013, 11:37 AM
  2. [SOLVED] UDF for information on multiple rows from 1 input
    By omegacaesar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2012, 12:33 PM
  3. input information on 1 pc send to other pc via network
    By jaeovitt in forum Excel General
    Replies: 3
    Last Post: 08-10-2010, 03:09 PM
  4. [SOLVED] Verify information and input a value
    By Richard in forum Excel General
    Replies: 0
    Last Post: 06-22-2006, 04:40 PM
  5. [SOLVED] Input cell information
    By RB Camp in forum Excel General
    Replies: 3
    Last Post: 05-18-2005, 01:06 PM

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