![]() |
X button on userforms
Hi Greg, look up QueryClose in VBA Help but this will disable the
X..... Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) Cancel = True End Sub Hth, OJ |
X button on userforms
Careful, this will stop you ever closing the form. You need to allow some
function to close it, such as a code triggered close, Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode < vbFormCode Then Cancel = True End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "OJ" wrote in message ups.com... Hi Greg, look up QueryClose in VBA Help but this will disable the X..... Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) Cancel = True End Sub Hth, OJ |
X button on userforms
that's why I said look it up in help!! I was literally reponding to the
OP...;o) |
X button on userforms
aaah, but you also said ... but this will disable the X....., and so it
will, and every other close option as well <ebg Bob "OJ" wrote in message ups.com... that's why I said look it up in help!! I was literally reponding to the OP...;o) |
X button on userforms
"Bob Phillips" wrote in message ... Careful, this will stop you ever closing the form. You need to allow some function to close it, such as a code triggered close, Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode < vbFormCode Then Cancel = True End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "OJ" wrote in message ups.com... Hi Greg, look up QueryClose in VBA Help but this will disable the X..... Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) Cancel = True End Sub Hth, OJ Well I found this more than usefull Thanks :) N10 |
X button on userforms
How do you disable the X button on userforms?
Thanks in advance Greg |
X button on userforms
perfect thanks again
OJ Greg |
X button on userforms
Hi All
This appears so simple but...... how do you turn off the Excel cell cursor or at the very least hide it? -- Cheers Nigel "Greg" wrote in message ... How do you disable the X button on userforms? Thanks in advance Greg |
X button on userforms
If you protect the worksheet, you can tell excel not to allow the users to
select any cell: Option Explicit Sub testme() Dim wks As Worksheet Set wks = Worksheets("sheet1") With wks .EnableSelection = xlNoSelection .Protect Password:="hi" End With End Sub Nigel wrote: Hi All This appears so simple but...... how do you turn off the Excel cell cursor or at the very least hide it? -- Cheers Nigel "Greg" wrote in message ... How do you disable the X button on userforms? Thanks in advance Greg -- Dave Peterson |
All times are GMT +1. The time now is 05:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com