Open file

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

Guest
Hi,
Can you solve my Db problems?
1. I have worked out the VB to make a control change colour when the pointer moves over it but I can not discover how to make it change back again when the pointer moves away.

2. I have a control in my Db which when clicked I would like to have open a file within a folder in drive D. I would like to do this in my VB programming

Thanks in anticipation
Michael
 
hi Anthony,

the onyl way you can get the colour back to what it was ( as far as I know ) is to use the MouseMove again with something like

If Me.Text1.BackColor = 1974 Then
Me.Text1.BackColor = 1001
Else
Me.Text1.BackColor = 1974
End If

it really doesn't work very well, you may be better off using got and lost focus or enter and exit depending on what you're doing

To open a file you can use Shell

Shell "C:\Program Files\Plus!\Microsoft Internet\IExplore.exe NameOfFileHere" , vbMaximizedFocus

It's in the help files if you need more

HTH

Drew
 

Users who are viewing this thread

Back
Top Bottom