Find Next Empty Row In Excel And Populate With Data Follow
I've been learning VB as I go along for this application but the scenario is this:
I currently have the script running at the time a user prints a label (onIdentidcalCopies), it opens up a spreadsheet, updates information, saves then closes the spreadhseet with the code below:
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("\\dt01.local\files$\UserFolders\samc\My Documents\Booker Card http://www.vbforums.com/showthread.php?735975-Find-Next-Empty-Row-in-Excel-and-Populate#\Printed Docs.xlsx")
objExcel.Application.Visible = True
objWorkbook.WorkSheets(1).Cells(1, 1).Value = "Test value2"
I could only find the code which would update a specified cell with the information given (1,1 for example). What I really need is for the code to move to the subsequent blank row below each time a label is printed to avoid overwriting information but I am stumped as to how to write this.
At this stage only one item is needed to be written to the spreadsheet so it will be restricted to column A, this will be variable data instead of fixed text as the script shows but I am fairly certain that's an http://www.vbforums.com/showthread.php?735975-Find-Next-Empty-Row-in-Excel-and-Populate# change I can make, I'd like to get the data sequencing right first.
Any help would be appreciated
Please sign in to leave a comment.