Hi,
Introduction:
I have just started using Excel VBA and am slowly learning the program for a project at work, using online tutorials, watching Macros being recorded and this really helpful forum.
However I need help, as I can not get my head around how I should do the following:
Issue:
I am currently creating a user form in which an individual can type in several variables and at the click of a button, the software, will paste the information on to the spreadsheet.
However I want to be able to create a command button within the user form that when clicked will:- Input a text, e.g. "Resume".
- Prompt the Hyperlink Dialogue Window to Appear.
- Individual selects appropriate document and clicks 'OK'.
- When Individual closes the user form, the next available empty row and cell is populated with the text "Resume" and the corresponding Hyperlink.
Current Solution:
Currently for the 'Hyperlink Command Button' within the user form, I have utilised the following Excel VBA code:
& The following happens:- User clicks the command button - 'InsertHyperlinkCommandButton'
- Text value of "Resume" inputs itself on the next available empty row, on column 5.
- The Hyperlink Dialogue Window Appears
- User selects their required document and clicks 'OK'
- Hyperlink is created but on the last highlighted cell, not on the next available empty row, on column 5.
I think that the reason why the hyperlink is not being pasted on to the required cell is down to the 'Export Data to worksheet' part of the VBA code. However I can not figure out what I should be typing instead.
Other:
I have attached an example worksheet of the VBA Code that I have shown above in working practice, below, as I am restricted on not being allowed to upload anything to do with work.
Example - Userform.xlsm
Thank you in advance.
Sinalk
Bookmarks