is this an acceptable way to pop up a form?

G

Gary Keramidas

i wrote an app for a client. there is a column with account numbers that are
comma separated , for each row of a form. some may have 1 account # , some may
have 10. the routines looks at each account # and then populates the form based
on their gl account number(s), from an imported text file.

so i once the form is populated, i create a before right click event that pops
up a form and displays the acct #, acct name and amounts listed in 2 listboxes.

anyway, the right click event only fires on single cell in column E and only if
the sheet is protected.

just wondering if you can foresee any problems i may encounter doing this.
 
G

Guest

Hi Gary,

Just adding some ... that I've worked with this one :
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)
Cancel = True
If Not UserForm1.Visible Then UserForm1.Show 0
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If UserForm1.Visible Then UserForm1.Hide
End Sub
 
G

Gary Keramidas

thanks for the feedback, halim

--


Gary


Halim said:
Hi Gary,

Just adding some ... that I've worked with this one :
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)
Cancel = True
If Not UserForm1.Visible Then UserForm1.Show 0
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If UserForm1.Visible Then UserForm1.Hide
End Sub
--

Regards,

Halim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top