Results 1 to 5 of 5

Add new job and hyperlink to corresponding sheet

Threaded View

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    8

    Add new job and hyperlink to corresponding sheet

    I have a userform that creates and fills in a new sheet from a template and fills in a master sheet. I am having issues with the master sheet overwriting the information already there. I would also like the Job Numbers on the master sheet to automatically add a hyperlink to the corresponding sheet.

    Here is the code I seem to be having trouble with:

    Set Ws = Worksheets("Master")
    
    'Find first empty row
    iRow = Ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
    
    'Add data from details sheet to database
    With Ws
        .Cells(iRow, 1).Value = Me.jobNumber.Value
        .Cells(iRow, 2).Value = Me.jobDescription.Value
        .Cells(iRow, 3).Value = NewSheet.Range("C14").Value
        .Cells(iRow, 4).Value = NewSheet.Range("H14").Value
    End With
    
    'Hyperlink job number to corresponding sheet
    i = Ws.Cells(Rows.Count, "A").End(xlUp).Row + 1
    ActiveCell.Hyperlinks.Add anchor:=Ws.Cells(i, 1), Address:="", SubAddress:=NewSheet.Name
    
    MsgBox "New job has been added."
    
    Worksheet("Master").Show
    Application.ScreenUpdating = True
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 10-27-2015, 08:59 AM
  2. Replies: 0
    Last Post: 10-27-2015, 08:57 AM
  3. [SOLVED] Create new sheet from template, auto fill from index sheet and hyperlink
    By RichTea88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2013, 04:57 AM
  4. Replies: 1
    Last Post: 02-23-2013, 05:18 AM
  5. Replies: 48
    Last Post: 09-27-2012, 12:27 PM
  6. Replies: 2
    Last Post: 01-13-2012, 04:59 PM
  7. Paste hyperlink to a hyperlink in another sheet
    By skiman123321 in forum Excel General
    Replies: 1
    Last Post: 12-14-2006, 07:25 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