Hyperlink dialog returns address to wrong cell

killaej6

New Member
Joined
May 22, 2021
Messages
7
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2011
  5. 2010
  6. 2007
Platform
  1. Windows
Hi,

I need help.

I am using the following code for my command button ( named Evidence) :

Application.Dialogs(xlDialogInsertHyperlink).Show

I am giving an option to users to select whichever file they want and i want the address of the file to appear in a cell that i have specified.

Cells(emptyrow, 24).Value = Evidence.Value

However, i have 2 problems :

1. On row 24, i get a result of FALSE
2. the link address is being returned to another cell ( i see that the address is being returned to the last clicked cell)

How do i get the address link to appear ( with the ability to function as a link of course) on the cell which i have intended?

Thank you in advance for your inputs.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Try
some thing like
VBA Code:
Sub test()

Cells(emptyrow, 24).Select
Application.Dialogs(xlDialogInsertHyperlink).Show

End Sub
 
Upvote 0
Hi Mohadin,

Worked like a charm!!.....Thank you...
 
Upvote 0
You're Very welcome
And thank you for the feedback
Be happy and safe
 
Upvote 0

Forum statistics

Threads
1,213,554
Messages
6,114,280
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top