May 27 2023 03:11 PM
Hello, as you can see above, the spreadsheet already has a column with PNG files inside it. I need to put a url on these files so they can be used in the cloud.
How can I do this?
Remembering that I don't have these files external to this worksheet. They are already inside it as shown above in the photo.
Thanks for any help.
May 28 2023 01:11 AM
The question isn't clear to me. Are you looking for a one-by-one solution or are you looking for a macro to do them for you? In case of a one-by-one solution: right-click on the item -> link -> add hyperlink (at the bottom). Or if you don't mind shortcuts: select the item and hit ctrl + k.
VBA
In case you're looking for a solution through VBA, you could design a form like the one above. The code for the example form could be:
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub ConfirmButton_Click()
' Get the row select
SelectedRange = Selection.Address
' Go over all rows
For Each Cell In Range(SelectedRange)
Hyperlink = UrlField.Value
' Check if the checkbox was checked to append the filename
If AppendBox.Value = True Then
' Add the current cell value to the hyerlink
Hyperlink = Hyperlink + Cell.Value
End If
' Set the HyperLink
ActiveSheet.Hyperlinks.Add Range(Cell.Address), Address:=Hyperlink
Next Cell
End Sub
Hopefully, this answers your question.
May 28 2023 03:37 AM
May 28 2023 03:08 PM
May 28 2023 04:15 PM
May 29 2023 02:39 PM