Results 1 to 2 of 2

Thread: Counting from a cell / Importing and Exporting to Excel.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    123

    Question Counting from a cell / Importing and Exporting to Excel.

    So I'm having troubles getting it to start. Nothing is put into the excel cell.



    Code:
     Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
    
    
            workbook = APP.Workbooks.Open("C:\Users\Callum\Documents\new.xlsx")
            worksheet = workbook.Worksheets("sheet1")
            counter += 1
            worksheet.Cells(1, 1).Value = counter.ToString("D5")
            Me.Close()



    End Sub
    The

    Code:
    "D5"
    I assume is meant for me to edit? but I need the program to do it itself. The code needs to the previous cell from excel and add 1 to it
    Last edited by callumwk; Oct 23rd, 2015 at 11:54 AM.
    VS 2017 - Need as much help as you can give (write it all for me!)

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    123

    Re: Counting from a cell / Importing and Exporting to Excel.

    Bump
    VS 2017 - Need as much help as you can give (write it all for me!)

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width