Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VBA Code Disappears Help!


After I create VBA Code in Excel 2007, it disappears. I create it, close VBA, return to Excel. However, when I try to go back to view the code, I get a blank VBA window. Any ideas?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
VBA Code In Word Template Disappears
when my template creates a new document, the vba code behind a command button can run but when i go to edit it in design mode, the code disappears and cant be run again. why does this happen? can it be avoided?

Tab Contents Disappears
Would certainly appreciate some help with this!!

I have a form with 6 tabs on it using microsofts SSTab component. Now the problem...when I place another form on top of it, then hide that form, the contents of the tab disappear. You have to click on another tab, then back to get the information to reappear. I have tried refreshing with doevents, but it doesn't work. If I refresh in the immediate window, it refreshes and is visible, but when running the program, it doesn't.

Any ideas?

Thanks...TeeTime3

Menu Through API Disappears
I'm Creating VB Menu at runtime from a table which has the menu items to be created. At Form Load Menu gets painted on the screen and is visible, once any other application or form is shown over the menu form, the menu disappears. My form is MDI form, i couldn't use paint event also. I would be thankful if any one helps me...

Ananth-India

MsgBox Disappears
This issue may be simple, but I struggle to solve this.

In my code I call a msgbox, which shows some message.

Some times msgbox behaves normal. But sometimes it appears and disappears in fraction of second.

Any Idea?

Image Disappears
Hello.

I have made some buttons of my own where i move using the Adodc.RecordSet.MoveNext/Previous/First/Last.

This is the code of one:


Code:
If Not Adodc.Recordset.EOF Then
Adodc1.Recordset.MoveNext
Else
Exit Sub
End If


I have connected an image with adodc. It shows me all the images when i move through the records but when i'm at the last record or first record and i press again the button, the image disappears. It's only a detail but i would like to know why it happens.

Any ideas?

Menu Bar Disappears
I am experiencing a wierd behavior from my MDI form. I have added 10+ forms in my project, All are MDI Child forms with BorderStyle of FixedSingle. I access these forms by their respective menu items located on a MDI form. All forms work nicely except two forms. When I try to access these forms, the forms appear, but the menu bar on the main MDI disappears. This bar remains invisible until I close the child form.
I am unable to understand this behavior, Is there something that I am missing?

DOS Window Disappears !
Hello all,

Pardon the lack of knowledge ---- whenever I run a VB or C++ program ( that I've previously compiled and linked) in Windows, the DOS window "disappears" after the program finishes running. I have to run the .exe files from a DOS prompt.

Is there a code that I can insert that will stop the program from exiting after running? I would like to have the .exe files runin Windows .....

TIA

Form Disappears
I am having a problem with one of my forms. Once I show it in a modal way, it disappears from my tab menu and from the task bar. The program is runnig and the form is loaded and once visible.. but if you change to another program... you cant find it anymore. Can anybody help me?

My Listview Disappears!
I have a User Control containing a listview.
When I open an application which covers a form containing the Control, the listview doesn't redraw itself when the application closes (or is minimised). This only happens when the listview has focus.
Help! Any ideas?

Excel From Vb5 Disappears
I am trying to pass data from an array in VB5 to an excel spread sheet
This code works but th spread sheet closes back up. I want the user to be able
access the spread sheet and the return to my program. The Variables are arrays
that are variable length.

Private Sub Command1_Click()

Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")

ExcelSheet.Application.Visible = True
   With ExcelSheet.Application
   Dim myarray As Variant
    .Selection.NumberFormat = "0.00"
   .Range("a1:l" & LTrim(Str(Dataptr(1, 0)))).Select
   .Range("a1:a" & LTrim(Str(Dataptr(1, 0)))).Value = .Transpose(Shottime)
   .Range("b1:b" & LTrim(Str(Dataptr(1, 0)))).Value = .Transpose(Shotpos)
   .Range("c1:c" & LTrim(Str(Dataptr(1, 1)))).Value = .Transpose(Shearpos)
   .Range("d1:d" & LTrim(Str(Dataptr(1, 2)))).Value = .Transpose(Clamppos)
   .Range("e1:e" & LTrim(Str(Dataptr(1, 3)))).Value = .Transpose(Nitropress)
   .Range("f1:f" & LTrim(Str(Dataptr(1, 4)))).Value = .Transpose(Clamppress)
   .Range("g1:g" & LTrim(Str(Dataptr(1, 5)))).Value = .Transpose(Shotpres)
    
    Rangestr = "A1:L" & LTrim(Str(Dataptr(1, 0)))
    .Range(Rangestr).Select
   



   
  End With
ExcelSheet.Application.Visible = True

   

End Sub


    Dan S

 

Edited by - dsperry101 on 9/8/2005 10:29:53 AM

Txt Box Disappears - But It Shouldn't!
I have the following code in the tree view mouse down.
When I step through and reach the line
Code:txtGrade.Left = (frmGrading.Width 2) - (txtGrade.Width 2)
the text box disappears, and I don't know why!!!

I am trying to centre the text box regardless of the length of text in it.

Code:Private Sub tv1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)

'...put users choice in the text box
Dim n As MSComctlLib.Node 'Since other object types may have nodes
Dim strTemp As String
Me.ScaleMode = 3

    Set n = tv1.HitTest(x, y)
    
    If Not n Is Nothing Then
        strTemp = "Grading syllabus for " & n.Text
        txtGrade.Width = frmGrading.TextWidth(strTemp) + (GetSystemMetrics(SM_CXBORDER)) * Screen.TwipsPerPixelX
        txtGrade.Text = strTemp
        txtGrade.Left = (frmGrading.Width 2) - (txtGrade.Width 2)
    End If
   
    Set n = Nothing
End Sub



Edited by - andy99 on 8/17/2003 7:25:37 AM

When The Checkbox Disappears...
i have a listview with chekboxes in a form
and when i launch the form, the checkboxes dissapear and i must click on it to recover them.
how can i solve this problem?

Formatting Disappears On Saving
if I save the contants of a rich text box to a text file all the formatting disappears,bold italic etc... why does this happen and how do i fix it

Mdiform Menu Disappears
I've got a MDIForm with a menu on the parent itself. When I run the program, the menu is invisible (yes its set to visible and not changed anywhere in the code) but reappears when I close all the children forms but leave the parent open. Can anyone tell me why this is??

MDI Form, Menu Disappears
I have a MDI form with a menu bar, the form will load with no MDI child forms. The menu options will open particular MDI child forms. Whenever I open a form the menu bar from the Main MDI form disappears until the current MDI child form is closed. How can I keep the menu bar visible and active while using child form is open?

Thanks in advance.

DrawString Text Disappears
I am using very simple DrawString code. The text displays, but after resizing the form, it goes away. Is there some additioinal call I need?

The code is something like:

Dim gr As Graphics = Me.ipInkPicture.CreateGraphics
gr.DrawString("This is a test", Font, Brushes.Black, x, y)
gr.Flush(Drawing2D.FlushIntention.Sync)

Form Content Disappears??
I have a VB6 program that works with the AS/400. You tell it to load the database files and it send a command to the AS/400 to create some files to be imported.

My question is that while the AS/400 is creating these files (multiple files and many records), the VB program sits and waits. If the screen saver comes on or you start something else over top the VB program, it removes the contents of the forms. The contents will not return until the control is returned to the VB program.

Is there a way to periodically refresh this screen while it is waiting?

Thank you for any help.

Form Icon Disappears
I have a form that has an icon in the upper left corner. When in design view, the icon shows normally. When I run the program in VB6 the icon changes to a little black box. I'm not sure how I got it to do this, but I can't figure out how to make it show the icon normally and I need my icon! Has anyone any clues?

Attached is the form code. It is probably something silly that I am overlooking. Thanks for looking.

Form Icon Disappears
I have a form with a flag icon for the form ico. When I run the program the place where the icon is supposed to be is a black square in the upper left corner. I havent seen this before and it has me puzzled. In design view the icon appears just fine. Anybody have any ideas?
Thanx in advance, Anthony

Program Window Disappears
Greetings!



The little app that I'm developing is acting a bit strange for some reason. Basically it completes the task and then disappears from view. When I minimize the remaining windows on my desktop I find that my app window is sitting right at the bottom of the pack. I have no idea which part of my code is causing the window to lose focus but what I am interested to know is if there is a VB command to eliminate this problem?



Thanks for your suggestions in advance.

MSHFlexGrid, Highlite Disappears
I am trying to return the value from a field in the grid when the grid is clicked, I have used both the SelChange and Grid_Click events to add code but in both instances the row is only highlited when you click then it dissapears (the variable is returned). What code do I need to add to get the row selected to highlite.

Private Sub MSHFlexGrid1_Click()

Dim lMouseRow As Long


' Set the grid selected by user to yes.
Grid_Selected = -1

lMouseRow = MSHFlexGrid1.MouseRow
'MSHFlexGrid1.Col = 1 *Causes Prob
'MSHFlexGrid1.Row = lMouseRow *Causes Prob
If MSHFlexGrid1.Clip = "ConnectionID" Then
Exit Sub
Else
If MSHFlexGrid1.Clip <> "" Then
'Grid_ConnectionID_Returned = CLng(MSHFlexGrid1.Clip)
End If
End If
End Sub

Ta Garry

Compiled EXE Disappears Completely!!!
Hi everyone!

Yesterday I encountered a very insane problem.
When I compile my VB project and click on a button to open a form, or when I click on a button on this form (the second one) my app disappears completely!

I have an error handler, I wrote MsgBox "1", MsgBox "2" statements on these two events, but no message at all!

I suspect that this is not an error regarding code? Perhaps something has gone corrupt? VB6 or my form?

This behavior occurs randomly however and NOT from VB6, only from the executable!

What on earth has happened?

Thanks in advance!

Highlighted Text Disappears
Hi,
I am coding a MUD client. The client has the incoming text stored in an RTF Text Box. Whenever text is highlighted, no cut or any command done, it disappears when you press enter. It also has this problem when you hit a button.

Thanks!

Popupmenu Disappears After 3 Seconds
I made a popupmenu in my project, but it disappears after about 3 seconds. Forms I've called with a command from the popupmenu also disappear.
My code is:

Sub Form_Mousedown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu Splash.PopupBeeld
End If
End Sub

Can someone help me out?

Combo Box Text Disappears!
I have a combo box that's supposed to show all values in a given database. The procedure works fine until it gets to the end, then for some reason the combo box loses its text. The list items are there, it just no longer shows the item I selected. I ran a quick debug, and it happens right on the first Exit Sub (the one before the error handler.)


Code:
Private Sub MasterControl_Click()
Set fso = New FileSystemObject
On Error GoTo ErrorHandler
MasterControl.Text = Replace(MasterControl.Text, " ", "")
If fso.FileExists(App.Path & "Databases" & MasterControl.Text & ".mdb") = False Then
For i = 0 To MasterControl.ListCount
If MasterControl.Text = MasterControl.List(i) Then
MasterControl.RemoveItem i
End If
Next i
Set rs = New ADODB.Recordset
RecordSource = "SELECT * FROM Headers ORDER BY Name"
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "DatabasesHeaders.mdb"
rs.Open RecordSource, ConnectionString, adOpenKeyset, adLockOptimistic
If Not rs.BOF Then
rs.MoveFirst
End If
For i = 1 To rs.RecordCount
If rs!Name = MasterControl.Text Then
rs.Delete adAffectCurrent
Else
rs.MoveNext
End If
If rs.EOF = True Then Exit For
Next i
End If
OrganizerDatabase.ListItems.Clear
Set rs = New Recordset
Set Win32Script = CreateObject("WScript.Shell")
For i = 0 To Data.Count - 1
Data(i).Locked = False
Data(i).BackColor = vbWhite
Next i
RecordSource = "SELECT * FROM " & MasterControl.Text & " ORDER BY SiteName"
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "Databases" & MasterControl.Text & ".mdb"
Win32Script.RegWrite "HKEY_CURRENT_USERSoftware" & App.Title & "CurrentSelectedItem", MasterControl.Text
rs.Open RecordSource, ConnectionString, adOpenKeyset, adLockOptimistic
If rs.BOF = False Then
rs.MoveFirst
End If
For i = 1 To rs.RecordCount
If rs.EOF = True Then Exit For
OrganizerDatabase.ListItems.Add , , rs!SiteName
rs.MoveNext
Next i
Set fso = Nothing
Set rs = Nothing
Set Win32Script = Nothing
Exit Sub
ErrorHandler:
MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, "Program Error"
Exit Sub
End Sub

Form Disappears On Min Button
Hi Everybody,

I have forms placed inside an MDI form. When I use the "minimize button on any of the child forms the form will disappear from the MDI form space. (The form will be apparant only from the windows xp task bar)

How do I fix that so that the Minimize event will still show the icon within the MDI workspace?

Many thanks,
Paul

ListView Selection Disappears?
Hey, all. I'm writing to you from my kitchen counter as I pack other items for a move halfway across the USA!

I'm using the ListView control in Report mode. Whenever I delete a row:


VB Code:
lstFruits.ListItems.Remove 2


...The selection disappears. Granted, that same index (two) is still selected, but the visual indicator of its selected status is now hidden. So, if someone uses the delete button again, they have no idea what they're about to delete.

Is this a bug in the control? Is there a workaround? I have HideSelection set to False, so that's not it. Hmm!

As usual, thanks for your help. Much appreciated.

Access DB Password Disappears
VB Code:
CN.ConnectionString = "Persist Security Info=false;User ID=admin;" _            & "Data Source=" & App.Path & "dataProgramData.mdb;Jet OLEDB:Database Password=mypass"


ok I have a password protected database... and i connect via ADO like the above code..

that all works fine.. but I also use a reference to JRO to programmatically compact/repair the database...


VB Code:
jeCompact.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "DATAProgramData.MDB;Jet OLEDB:Database Password=mypass", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "DATABACKUPProgramData.MDB;Jet OLEDB:Engine Type=5;Database Password=mypass"


after I do this I delete the original DB file and copy the newly backed up one to the data directory so that the end user will now be using the compacted database file..

all this works fine but after the compact is done.. the database password gets lost, and users can just open the database in access... any thoughts on how to keep the password intact when doing this?

Combo Text Disappears
Hi All,

Here's a strange one. I have 2 combo boxes of the same type on screen. I also have 2 grids and the grids are bound to different ADO recordsets. When I select an item from one of the combos the recordpointer on the associated grid moves to the item where a column has the associated value and all is fine. I do exactly the same with the other combo and grid, but after the recordpointer has moved on the grid, the value in the combo disappears. When stepping the code at the 'End Sub' line of the combo's click event the correct values are still in the combos text property. As soon as I F8/F5 off, the text disappears. I've removed and replaced the control, put debug statements into every event incase somthing else is triggering and nothing is.

Menu Disappears In MDI Form
Hi Group
I have an MDI app with a number of child forms. One child form is loaded at
startup. When this happens the File Menu disappears in the MDI Form. If
the form does not load the File Menu remains. Can anyone explein why the
File Menu would disappear under these circumstances.
Regards
Phil Jones
The Logical Interface
02 9541 0367
www.logint.com.au
email@removed

Excel Sheet Disappears
I am trying to pass data from an array in VB5 to an excel spread sheet
This code works but the spread sheet closes back up. I want the user to be able
access the spread sheet and then return to my program. The Variables are arrays
that are variable length.

Private Sub Command1_Click()

Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")

ExcelSheet.Application.Visible = True
   With ExcelSheet.Application
   Dim myarray As Variant
    .Selection.NumberFormat = "0.00"
   .Range("a1:l" & LTrim(Str(Dataptr(1, 0)))).Select
   .Range("a1:a" & LTrim(Str(Dataptr(1, 0)))).Value = .Transpose(Shottime)
   .Range("b1:b" & LTrim(Str(Dataptr(1, 0)))).Value = .Transpose(Shotpos)
   .Range("c1:c" & LTrim(Str(Dataptr(1, 1)))).Value = .Transpose(Shearpos)
   .Range("d1:d" & LTrim(Str(Dataptr(1, 2)))).Value = .Transpose(Clamppos)
   .Range("e1:e" & LTrim(Str(Dataptr(1, 3)))).Value = .Transpose(Nitropress)
   .Range("f1:f" & LTrim(Str(Dataptr(1, 4)))).Value = .Transpose(Clamppress)
   .Range("g1:g" & LTrim(Str(Dataptr(1, 5)))).Value = .Transpose(Shotpres)
     
    Rangestr = "A1:L" & LTrim(Str(Dataptr(1, 0)))
    .Range(Rangestr).Select
    



    
  End With
ExcelSheet.Application.Visible = True

    

End Sub


    Dan S

 

Edited by - dsperry101 on 9/8/2005 10:29:53 AM



Edited by - dsperry101 on 9/8/2005 11:40:29 AM

Statusbar Disappears While Colorizing
Hello again
I made sure that no controlls are being displayed over the status bar, however when I colorize my richtext box the status bar disappears. ( I am using Dekes colorize method)
I tried setting the StatusBar ZOrder to vbBringToFront and that has no effect.
Anybody have any Ideas
thanks

Excel Sheet Disappears
I'm running some vba code that is working with several large worksheets...the code can take several minutes to complete. Sometimes the workbook the code is running in just disappears and all I see is the gray background of excel. Once the code is done, the active workbook does reappear and everything is fine. During the code execution I have ScreenUpdating set to false.

Anyone know about this and how to stop it?

Thanks

Information From Textbox Disappears!
Hello All,

I have run into a new problem with my program.

When a user tabs into a certain textbox on the form a new form will open. In this form the user input some numbers and then hit submit to send this info back to the main form. This part works fine.

The problem is that when the user hits the calculate button on the main form for final calculations the numbers inported from the mini forms (I am not sure what you call them) disappears.

Any help would be greatly appreciated.

Excel Sheet Disappears
I am trying to pass data from an array in VB5 to an excel spread sheet
This code works but the spread sheet closes back up. I want the user to be able
access the spread sheet and then return to my program. The Variables are arrays
that are variable length.

Private Sub Command1_Click()

Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")

ExcelSheet.Application.Visible = True
With ExcelSheet.Application
Dim myarray As Variant
.Selection.NumberFormat = "0.00"
.Range("a1:l" & LTrim(Str(Dataptr(1, 0)))).Select
.Range("a1:a" & LTrim(Str(Dataptr(1, 0)))).Value = .Transpose(Shottime)
.Range("b1:b" & LTrim(Str(Dataptr(1, 0)))).Value = .Transpose(Shotpos)
.Range("c1:c" & LTrim(Str(Dataptr(1, 1)))).Value = .Transpose(Shearpos)
.Range("d1:d" & LTrim(Str(Dataptr(1, 2)))).Value = .Transpose(Clamppos)
.Range("e1:e" & LTrim(Str(Dataptr(1, 3)))).Value = .Transpose(Nitropress)
.Range("f1:f" & LTrim(Str(Dataptr(1, 4)))).Value = .Transpose(Clamppress)
.Range("g1:g" & LTrim(Str(Dataptr(1, 5)))).Value = .Transpose(Shotpres)

Rangestr = "A1:L" & LTrim(Str(Dataptr(1, 0)))
.Range(Rangestr).Select
End With
ExcelSheet.Application.Visible = True



End Sub

help !!!

Dan S

ActiveX Control Disappears
Ok, I'm trying to figure out how to create an activex control using vb6 which does two things - implements the iobjectsafety interface, and accepts parameters form the <Object> tag.

I created the sample control for implementing IObjectSafety as described in the MS support article Q182598. Created a deployment package. Copied the .htm and the .cab to my local inet server directory. Referenced page through IE6. Control appears, and when I click the command button, the message box pops up.

I then added a text box.

Ran the VB6 ActiveX Control Interface Wizard, and set up a single property mapped to the text box.

Recompiled and rebuilt the package. Changed the .htm file the package tool created to have a single parm.

Copy the .htm and .cab file to my local inet server directory, and ran.

Html page comes up blank - control not visible.

Anyone have any suggestions?

Label Caption Disappears
hi everybody,

i am using a label in a vb form, whose caption is changed at runtime to show progress. But this caption disappears at few moments and a white patch appears on the form. The caption with new value reappears after a few seconds. What might be the problem and how to rectify this? Please Help

Thanks in advance

Command Button Disappears - Please Help!
Hi,
One of my command buttons, when clicked, disappears, and the form where this button was then becomes transparent. If the transparent spot is clicked, the click event for the command button still runs as normal. However, there is no command button visual! Any suggestions? I've been trying for weeks to fix this problem, but nothing seems to work.
Thank you for any help anyone can give me!

Msgbox Displays And Quickly Disappears
I am using message boxes to display any errors that occur. But the message boxes are appearing but are quckly disappearing as if they press the vbOK button. This is the code I am having trouble with.


Code:
'Check to see if the database exists
If Dir(App.Path + "DatabaseName.mdb") <> "" Then
'Database exists
MsgBox "Database Exists"
Else
'Database does not exist
MsgBox "Database cannot be found. The software will attempt to restore a backup database.", vbCritical, "Program Error"
If Dir(App.Path + "BackupDatabaseName.mdb") <> "" Then
'Backup database does exist
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile App.Path + "BackupDatabaseName.mdb", App.Path + "DatabaseName.mdb", True
MsgBox "Restoration Complete"
Else
MsgBox "No backup database can be found. The restoration will be cancelled.", vbCritical, "Program Error"
'Create a new blank database
MsgBox "The current and backup database cannot be found." & Chr$(10) & "A new one will be created.", vbInformation, "Database Not Found"
'**PLACE CREATE SCRIPT HERE**
End If
End If

Data In PowerPoint Chart Disappears
I do quite a lot of automation of graphs in PowerPoint from Excel. Occasionally, a chart will look like it has the correct data in, but when you double-click into it, the data reverts back to what was originally in the PPT chart (prior to automation).

I can't really attach my code because it is part of quite a large app. However, the following shows how I am referencing the PowerPoint objects:


Code:
Dim oActiveSlide As PowerPoint.Slide
Dim oObject As Object
Dim oDataSheet As Object

'set reference to graph object and datasheet
Set oObject = oActiveSlide.Shapes(MyShapeName).OLEFormat.Object
Set oDataSheet = oObject.Application.DataSheet

'put data into datasheet
oDataSheet.Cells(2, 2).Value = "2"
'...etc

oObject.Application.Update
oObject.Application.Quit

I am using version 10 of Excel and PowerPoint. Back when we first got version 10 we had a similar problem, but it appeared to be fixed by using Application.Update & Application.Quit after putting data into the chart.

Although this problem only happens occasionally, it seems to be "random" - I can't see any pattern to when it happens, and it is not replicable. Has anyone else come across this problem?

Thanks.

Text Disappears In Chart In VB Report
Helllo, I have a excel file with a chart that I'm trying to imbed into my VB report. (the sheet is actually updated by a macro in the VB)

Everything looks fine in design mode, but when I preview or print the text (legend and values) dissapear. Is this a size issue or Is there another way to get the chart on my report. Thanks!

Form Disappears When Message Box Pops Up
Help?!

I have a main form that loads other forms on top of it.
If I set the other forms border style to "0 -None", when a message box pops up for that form, the form disappears until I select an option in my message box. After that it will display as normal.

Control Disappears On MouseMove Event?
See, I have a neato little "Status Label" on my user form (lblStatus) whose caption I want to change when the user moves their mouse over each of the buttons. Like when the mouse pointer moves over the Blue button, I want lblStatus to read "Click here to turn Blue."

So, under the MouseMove event for the button btnBlue, I put

lblStatus.caption = "Click here to turn Blue"

...but when my program is running, when I put my mouse over that button, lblStatus just disappears. Totally. Like, gone from view.

As soon as I move the mouse OFF of btnBlue, lblStatus reappears, with the caption specified above.

Anyone know why the label is becoming invisible temporarily?

Control Disappears On MouseMove Event?
See, I have a neato little "Status Label" on my user form (lblStatus) whose caption I want to change when the user moves their mouse over each of the buttons. Like when the mouse pointer moves over the Blue button, I want lblStatus to read "Click here to turn Blue."

So, under the MouseMove event for the button btnBlue, I put

lblStatus.caption = "Click here to turn Blue"

...but when my program is running, when I put my mouse over that button, lblStatus just disappears. Totally. Like, gone from view.

As soon as I move the mouse OFF of btnBlue, lblStatus reappears, with the caption specified above.

Anyone know why the label is becoming invisible temporarily?

Listbox Scrollbar Disappears When I Resize It
If I resize a listbox using it's height property, it's scrollbar disappears for some reason. How can I prevent that or make it reappear ?

An example:

I use the AddItem method to add items to the ListBox, and when the window is filled up, the vertical scrollbar appears by itself and does its job. However when i resize the ListBox by modifying the Height property of the ListBox, the scrollbar vanishes and never comes back.

What am I not doing right ?

Please help. This is getting annoying

Form Disappears But Program Still Running!?
here's code to a button that tests to see if the COM port has a functioning modem on it:

Private Sub cmdTest_Click()
On Error GoTo Eline:
'test modem
'close port 1st
If MSComm1.PortOpen Then
MSComm1.PortOpen = False
End If
MSComm1.CommPort = cboPort.ListIndex + 1
MSComm1.PortOpen = True
MSComm1.Output = "ATDT 1-800-330-0428" + vbCr
x = MsgBox("You should be able to hear the modem dialing the phone line. Can you?", vbInformation + vbYesNo, "Modem Test")
MSComm1.PortOpen = False
If x = 7 Then
MsgBox "Select another COM Port and test it.", vbInformation, "Modem Test"
Else
Call cmdApply2_Click 'write to cfg
sbrStatus.Panels("Msgs").Text = "New Settings written! "
sbrStatus.Panels("Msgs").Picture = LoadPicture("c:ThorpeFormsEfiledataexc.ico")
Timer1.Enabled = True
End If
Exit Sub
Eline:
MsgBox "This is not a modem! Select another COM Port and test it.", vbExclamation, "Modem Test"
End Sub

When i test the program from within the VB project, all is well. However, when i compile it and then use this button, the code executes but the form disappears!! And if i hit ctrl+alt+del for a list of running programs, it is listed as still running!? can ANYONE tell me why this is happening and how i can fix it!?!?!

Text Disappears When Focus Is Lost?
txtMyRef.Text Properties:
Data Field = MyRef
DataSource = adcInvoiceDisplay

adcInvoiceDisplay Properties:
Command Type = 8 - adCmdUnknown
RecordSource = "SELECT * FROM Invoice"

If the RecordSource has a specific index, then the text field is ok, however on start up, if the database is empty, i type something in the text field, change the focus to another field, and the text vanishes, as though the ADODC is still trying to load data that doesn't exist yet?

Any ideas?

Why Data DisAppears On Enter Event?
hi frds

In Case Of flexgrid or Any Other Grid when We Try To Update Data Of Any Particular Row Without Help Of Mouse Then Data Disappears.

Check Out The Image Which I Attached With this Query.

Query : When I Use Mouse To Update My Name Shakti Then Cursor Blinks At The Last Position Of Shakti And Then I Can Easily Update My Name.
But When I Press Enter Thru KeyBoard To Update My Name Then Cursor Blinks On The First Position Of That Row and My Name Disappears.

Here I Don't Want to use Mouse..........I Want To Use Keyboard In the Same Working style Of Mouse
Is It Possible........

InProcess DLL Modal Form Disappears
Hi

I am writing a DLL that gets called by an application. This is a third party application, for which I have no code. This application for the most part runs as ActiveX (I think ) inside explorer browser

The DLL is developed as an activeX "InProcess" DLL in VB 6.0 (win32 unmanaged code)

My DLL throws some MODAL VB forms at users to capture some data and process it

What I observe is, that some times (it is reproducible, but not exactly sure how)when one of my forms is under display and an external event happens (such as an IM ping or email coming etc.), My form disappears and the app browser hangs.

My hypothesis is:
The external event causes App browser to assume control (for refresh and/or painting) and then it has no way to return control to my DLL (or even know that My DLL had control)

Questions:
1. IS the above hypothesis correct?
2. Is there any way of circumventing this problem (I have tried to play with keeping my window in top of other windows - but that does not solve this problem)

Please help

Matt

Copyright 2005-08 www.BigResource.com, All rights reserved