PDA

View Full Version : Solved: textbox disappears



danovkos
10-06-2009, 02:44 AM
Hi all,
pls. can you help me?
after clicking on button with this code my textbox in sheet "all" sometimes disapperars.
Strange is, that it is active (i can immediately start to write), but i can not see it. After starting writting or clicking in any cell in this sheet it will appears.
Do you know why?



Private Sub VyhladavanieVIEW_Click()
With Sheets("all")
.Select
ActiveSheet.TextBox5.Activate
End With
End Sub

nst1107
10-06-2009, 10:08 AM
Couldn't replicate your problem in 2007 nor 2003. Is that the full extent of your code?

danovkos
10-07-2009, 12:21 AM
yes, this is full code. I use office 2003 and now i figured out this:
I use for switching between sheets command button.
In sheet "view" is it command button "vyhladavanieVIEW" with this code:

Private Sub VyhladavanieVIEW_Click()
With Sheets("all")
.Select
With .Range("B1")
.Select
ActiveSheet.TextBoxALL.Activate
End With
End With
End Sub


And in sheet "all" is it comm. butt. "VlozCIFdoVIEW" with this code:



Private Sub VlozCIFdoVIEW_Click()
Dim cif As String
'Do
'Loop
cif = Range("B1").Value
If cif = "" Then
With Sheets("view")
.Select
With .Range("B1")
.Select
End With

End With
Else
With Sheets("view")
.Select
With .Range("B1")
.Value = Sheets("all").Range("B1").Value
.Select
End With
End With

End If
End Sub

I figured out, that problem is in switching with com. button "VlozCIFdoVIEW". If i dont use it, it works OK and textbox appears always. But if i use to swicht to "View" my cmd button "VlozCIFdoVIEW" after comming back with cmd butt. it disappear.
I dont know if i am clear...i hope yes.

where is a problem?
thx

danovkos
10-07-2009, 05:10 AM
now i know, where was a problem.
If was window freezed, it didnt works. But if is windows unfreez, it is OK