473,377 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,377 software developers and data experts.

Trying to set the value of a VBA Hyperlink variable (and failing)

I have defined the following...

Expand|Select|Wrap|Line Numbers
  1. Public Type AAA    ' Create user-defined type.
  2.     MyLink As Hyperlink
  3. End Type
Then (in a Subroutine) I define an instance of type AAA...

Expand|Select|Wrap|Line Numbers
  1. Dim Tst As AAA
but when I try to set the value of

Expand|Select|Wrap|Line Numbers
  1. Tst.MyLink = "#aldsfjadsfasd#"
I get a run-time error '91'

I would appreciate assistance to understand how I can set the Hyperlink value before I then save it to a Hyperlink field in a table.
Aug 30 '12 #1
2 4010
twinnyfo
3,653 Expert Mod 2GB
Andrew,

I think you may be overthinking this problem. If you have a hyperlink field in a table, you can set the value as if it were a text field. Like so:

Expand|Select|Wrap|Line Numbers
  1. Me.txtHyperlinkField = "www.bytes.com"
  2.  
Hope this helps.....
Aug 30 '12 #2
NeoPa
32,556 Expert Mod 16PB
Error 7980: HyperlinkAddress or HyperlinkSubAddress read-only for Hyperlink should help with that :-)
Aug 30 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Mike | last post by:
Is there any way I can use a function to create a variable and assign a value to it? I have a Perl script that returns some LDAP information: sn=Shore givenname=Mike logintime=20041008153445Z...
1
by: refer_to_website | last post by:
How can I retain the value in memory in the ASP.NET Web application? NOTE: This example works correctly (increments the value) when the you create a VB.NET Windows Application, but does not work...
4
by: Dave | last post by:
I used the following class and .aspx code below to understand how static works on variables and methods taken from...
0
by: Waran | last post by:
Hi, In a datagrid I am displaying 2 columns. One is a Hyperlink Colum and the other is a Button Column. The values for the hyperlink columns are fetched from the database and its a url. When I...
20
by: weston | last post by:
I've got a piece of code where, for all the world, it looks like this fails in IE 6: hometab = document.getElementById('hometab'); but this succeeds: hometabemt =...
1
by: Roger Oshaug | last post by:
How would I assign the MAX(value) in a tablecolumn to an Integer variable, or put another way, assign any value from a table record to a variable? I am trying to achieve something like this: ...
2
by: Cliff | last post by:
Hi, i would like to get the value of variable 'em', defined in code-behind, into a textbox. I tried two ways but withoit succes (no error). The first textbox is empty, the second gets:<%=em...
4
by: jk | last post by:
Newbe here :) I am trying to get a pixmap to appear in my KDE system tray like knotes, akregator etc. Cutting out a lot of code the key lines are ... QPixmap mPixmap; .... mPixmap =...
3
by: Lloyd Dupont | last post by:
I think Vista might be the culprit.... Anyway, could anyone share with me how to send some data over UDP and recieve it? Now it's not working, and I have no clue if it's the sending or recieving...
4
by: kat248637 | last post by:
suppose i have a variable in shell script like a="prashant" and i want to assign this variable into another variable like b=$a,which is in perl script.after run perl script the value of b should be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.