Adrian Estoquia wrote:
> I am currently migrating my VBA code into delphi. But I have hard time
> converting it
> in a delphi fashion.
>
> Range("D1").Select
> With Selection.Interior
> .ColorIndex = 15
> .Pattern = xlSolid
> End With
> ActiveSheet.Hyperlinks.Add Anchor:=MainSht.Cells(1, 4), Address:= _
> "C:\", TextToDisplay:="Link"
>
>
> Is there a possible equivalent for this one in delphi? I want to use With
> statement
Then go right ahead and use it. Omit the leading period from the members
of the "with" value. Check the documentation.
> and also wants to create a link in the sheet.
You should be able to find link controls from several component sources.
It's also very simple to make a normal TLabel control act as a link.
Change the font style and the cursor style, and then handle the OnClick
event to activate whatever target address you have. ShellExecute is the
API function to call for Web addresses.
--
Rob