UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Copy The Current Internet Explorer URL To A Field, Any Versions    
 
   
BuzyG
post Dec 6 2017, 08:42 AM
Post#1



Posts: 421
Joined: 20-September 12
From: Cornwall UK


Hello again folks. I'm hoping this one is straight forward.

I have internet Explorer 11 open and simply need to copy the current URL from the address bar, into a field, [DiscLink], on the current form. The Microsoft Internet controls Library is loaded.

Presently this is what I have, alas it does not work.

CODE
Private Sub btnGetURL_Click()

  Dim IE As SHDocVw.InternetExplorer
  Dim StrURL As String

  StrURL = IE.LocationURL
  Me![DiscLink] = StrURL

End Sub
Go to the top of the page
 
 
Start new topic
Replies
GroverParkGeorge
post Dec 6 2017, 08:52 AM
Post#2


UA Admin
Posts: 36,486
Joined: 20-June 02
From: Newcastle, WA


What does it mean to say it doesn't work? Wrong URL? No URL? Nothing pasted into the table or ?

Go to the top of the page
 
BuzyG
post Dec 6 2017, 09:00 AM
Post#3



Posts: 421
Joined: 20-September 12
From: Cornwall UK


A fine question George. Apparently my wishing for it does not make others telepathic.


Object Variable or with Block Variable not set occurs at...

StrURL = IE.LocationURL
This post has been edited by BuzyG: Dec 6 2017, 09:07 AM
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    18th January 2020 - 09:28 PM