Hey I Am Hanging Please Help On Grid
Hello to all genius,
i want to enhance the flexigrid , my main aim is to create a non-bound grid which just acts as a excell sheet .,in which i want to set headings to columns and some properties like colwidth etc . to the columns .
can you just give solution which should be similar to a dbgrid but not bounded
please i am trying this long time and not able to get it
plz help
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Exe And Vbd Hanging
Hi,
When upgrading a component, we supply the new server vbds and the new exe. If there is a mismatch of exe <=> vbd versions, the client hangs on the machine, which requires task manager to kill ie and the exe processes.
Whilst this is normally due to error, we would like to preempt this condition and prevent the hanging.
Does anyone know what part is actually hanging ? is it the run time system ? the actual exe ? There doesn't *seem* to be a way of validating the vbd from within the exe.
The only way i have thought of doing this so far is via another application/script/whatever, that would check something like the file dates of the vbd and the exe.
BUT, I would rather have it self contained in the exe rather than another script/app or wrapper.
FTP Hanging...
A while back I downloaded InetTransferLib from http://www.mvps.org/access/modules/mdl0037.htm I integrated the FTP module into my Access 2000 project - and it worked. However lately when I came back to test the upload/download function after converting to Access 2003, it connects and the then starts to uploads...then it just HANGS - the only way out is to "End Task" using Task manager.
Does anyone use the same FTP module? Any fixes for Access 2003? Also is there any FTP module which is recommended which work with Access 2003?
Many thanks in advance.
Will
Can Anyone Help Me From Hanging
Hi all,
I was totally confuse,
My client want a cross-tabbed enterface where he can edit datas
directly which comes through an sql-join.
That is he want to plot years and months in x axis
and products in yaxis.
he must able to feed simulataneously data in any cells.
just like an excel sheet but using RDBMS.
There RDBMS should not die that was very important here.
The same grid will be something like this..
Products.
-----------
computer.
printer
scanner
... upto n products
years and months
----------------------
2000 jan
2000 feb
2000 mar
upto n years and x months.
now the userinterface should be like..
products | jan | feb | mar | apr ......| dec
--------------------------------------------------------
Computer | 1 | 2 | 4 | 1 | 5
printer | 2 | 3 | 1 | 2 | 10
scanner | 8 | 9 | 12 | 2 | 3
i think all understood for what i am suffering..
ok thank u all for reading this query.
Bye.
Friend forever ,
Aniz.
Dll Hanging On.
Hello all. I have another problem for you.
Here's the deal. I have two COM objects written in VC++. I did not write these. These dll's control all of the access to the database that my VB GUI accesses. All of the tables in the database have been implemented as class objects in the Dll. For each table there is a list object with Count and Item properties, and Add, and Delete methods. There is also an item Object. This holds the info from the database for each record. Anyway that is all probably useless info.
I have referenced these dll's in my project, and use CreateObject to create an instance of the dll. The user then bangs away at the gui, adding deleting amending etc. Then when they are finished they close the App.
Now when the application closes down i set all object references to nothing, and generally clean up. This works bloody marvellously under NT. However, Windows 95 and 98 is a different story.
When the application closes down in 9x, it all appears to shut down correctly, but if you look in the task manager, the application is still listed, but it is not responding. We are pretty sure that the problem lies in the dll somewhere, but cant for the life us find it.
I was just wondering if anyone else has had problems like this and has a soloution, or if you can shed some light on what may be happening.
Regards,
Iain.
Uninstall Hanging
I made a program and am in the process of making an installer for it.
The installshield program I'm using is Wise For Windows Installer.
the installation I have made works, but there seem to be problems with uninstalling.
When I click the uninstall button for the program in the windows software dialog it hangs on the screen "Please wait while Windows configures <programname>".
the process bar in that little screen keeps hanging at about 25% ..
anyone happen to know what's causing this ?
I don't have any special actions to do when uninstalling. it just needs to delete the directory and files it installed.
I didn't specify any special things in wise for windows installer to do when the user uninstalls it..( I don't even know if you can specify stuff to do when uninstalling in wise)..
would really appreciate any help anyone could give me
thanks in advance
slashem
Inet Hanging
I have literaly spent days on this now and I have traced the problem to inet.
Right now I'm trying to get it to work on a basic form. When ever it errors out and the program is exited the vb ide will just hang for about 1 -2 mins and finally go back to its normal status afterwords.
Is there a way to unload inet? (I've already tried unload inet and inet.cancel but that didn't work).
I know it must be something simple. But what?...
Program Hanging Up
My program hangs on the last line of the following subroutine:
----------------------------------------------------------
Private Sub SetDefaultPrinter(ByVal PrinterName As String, _
ByVal DriverName As String, ByVal PrinterPort As String)
Dim DeviceLine As String
Dim r As Long
Dim l As Long
DeviceLine = PrinterName & "," & DriverName & "," & PrinterPort
' Store the new printer information in the [WINDOWS] section of
' the WIN.INI file for the DEVICE= item
r = WriteProfileString("windows", "Device", DeviceLine)
' Cause all applications to reload the INI file:
l = SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, "windows")
End Sub
----------------------------------------------------------
If I compile the program and run it on another PC, it runs fine, so I think I must have deleted something on my development PC.
I did not write this routine and do not know what it invokes.
(When the program hangs, I need to CTRL-ALT-DEL to get out of VB6.)
Can anyone tell me what I need to reinstall (VB6, Repair XP, etc.) to resolve this problem?
Thanks in advance.
H. Chain
Houston, TX
Hanging Up On Terminate
hello me again,
next problem
Code:
Private Sub UserForm_Terminate()
msg1 = "Wilt u stoppen? Alle gegevens zullen verloren gaan!" ' Want to stop?
Style1 = vbYesNo + vbQuestion ' Definieert knoppen.
titel = "Programma verlaten ??" ' Leave programm?
Response = MsgBox(msg1, Style1, titel)
If Response = vbYes Then End
If Response = vbNo Then home.Show
End Sub
when i click Yes, the program ends like it should be.
when i click No, i cannot do anything else. all buttons on userform do nothing anymore. What did i do wrong??
thx
Compiler Hanging Up... C2.exe
anybody know why a compiler would hang up..... without errors... 2gig process 30gig hd. sufficient performance.... just hangs up and 99% of processor in "Task Manager" on xp..
Program Hanging Up
I have a large app with hundreds of procedures.
I haven't made many changes in the last couple of months, but I've been running it daily from the IDE.
Suddenly it's started hanging up and I can't get the IDE to break.
If I pull up Taskmanager, it doesn't list the app or the IDE as 'Not Responding'.
But I still have to use Taskmanager to kill the app.
I added a timer set to one minute with a 'Stop' in it, but that doesn't fire once the app hangs.
Does anyone know of a VB IDE plugin like MZTools that can add logging to each procedure then remove it when you've found the problem?
If not, can someone point me to a tutorial on how to make a VB Plugin?
It would add something like this to the top of each proc:
vb Code:
'ProcLog debug.print "ProcName: " & strProcName, "ParamOne: " & varParamOne 'etc '/ProcLog
Winsock Hanging
My program uses the Winsock control to connect to a remote server and retrieve a configuration file.
It does this every 10 minutes or so.
Sometimes it just hangs with a state of 'connecting'.
How can I get it to time out after a few seconds?
Thanks
MS Word Hanging On
I use word to generate a letter within a VB 6 app. It's worked great for years, but now I find the need to delete the letter from the file system after it has been generated and saved to disk from within my app. When I try to delete, it says Word still has it busy. I have tried setting the app and doc objects to nothing but I still have to go to task manager to end the process.
Any ideas would be helpful.
Thanks.
VB Command Exe App Hanging
Okay, I have this VB6 app that is a fairly simple command line exe app.
It contains only one sub and all it really does is loops through a recordset printing two different reports (Crystal) for each time through the loop.
Lately, we have noticed that the app doesn't end properly because it stays out in the Running processes of the machine.
Is there something in particular that I should be looking for or certain lines that I should make sure are a part of both my normal sub exit and the on error sub function?
Thanks.
URLDownloadToFile Hanging App...now What?
everything works great for 500 - 1000 or so cycles through the loop...then it hangs the app(excel) and i gotta shut it down, start up and resume...
I am POSITIVE the prob is with URLDownloadToFile and not anywhere in the pre or post code...it seems to get hung up with the site it connects to and i can accept that.
the prob is I can't do anything once it hangs...any ideas ?????
(prior to hanging DownloadFile returns 0 ALWAYS)
I am using URLDownloadToFile as follows:
VB Code:
'setup code THISFILE = Dir(DIRPATH) Do While THISFILE > "" myUrl = "'code that builds the url from THISFILE data" DownloadFile = URLDownloadToFile(0, myUrl, "C:myfoldermyfile.txt", 0, 0) 'code to parse myfile.txt THISFILE = Dir Loop
Urldownloadfile Hanging
I am using urldownloadfile api in a macro in excel. Sometimes the website I download from hangs , then the only way to regain control is to force excel to shut down. Is there a way to programaticly abort urldownloadfile after a period of time and continue my code execution ? tks for any help...
Hanging Upload
VB Code:
Open "C:Program Fileslah.txt" For Append As 1Print #1, "hihihi"Close 1[b]Call CheatUpload[/b]TerminateEXE "MyProgram.exe"
When it gets to the bold part, it hangs and doesn't respond.
Here's the Upload code:
VB Code:
Public Function CheatUpload() Dim hConnection As Long, hOpen As Long, sOrgPath As String hOpen = InternetOpen("API-Guide test program", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0) hConnection = InternetConnect(hOpen, "hostname", INTERNET_DEFAULT_FTP_PORT, "user", "pass", INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0) sOrgPath = String(MAX_PATH, 0) FtpGetCurrentDirectory hConnection, sOrgPath, Len(sOrgPath) FtpPutFile hConnection, "C:Program Fileslah.txt", "blah.txt", FTP_TRANSFER_TYPE_UNKNOWN, 0 InternetCloseHandle hConnection InternetCloseHandle hOpenEnd Function
What's the problem?
Crystal && Hanging
Guys,
Got an urgent problem.
I installed an app that used Crystal on a PC. Works fine. Install a later version. App works fine, Crystal reports hang ?? Mdacs the same, install's the same...
Any ideas Please ??????
Thanks
Peeman
Unload Hanging
Hello everybody peeps.
has anyone found a way of stopping the PC hanging when you unload a form with over 20,000 rows in a listview? The more rows i have , the longer it takes to unload the app.
6000 rows is about 4 seconds, 15000 rows, about 30 seconds and 25000 rows i may as well go for a pint! Any ideas on how to speed this up?
Ta muchly
How Do I Stop My App From Hanging??
Ok, I have a small app that searches for *.mp3 files on my entire C: drive. It lists in the frmMain.Caption the folder path it's currently searching.
Well, after about 10-15 seconds after the search begins, the screen just hangs with a HourGlass icon and the frmMain.Caption no longer updates. The search still continues though but the hang won't stop until after the search is finished.
VB Code:
Dim fd As Folder For Each fd In vFolder.SubFolders frmMain.Caption = "Scanning folder - " & fd.Path ScanFolderFor fd, "mp3"Next fd 'when an MP3 file is found, the code continues here
Is there a way to stop this hanging???
-- Ethan --
Program Keeps On Hanging
The error message "You cannot carry that action this time" appears anytime in my database and then it hangs. What i do is close the database and restart the computer. Also, sometimes it says "Not enough memory..." eventhough the database is the only one opened. What should i do?
Hanging By A Thread
Can somone explaion how to star multiple threads? I'm trying to code a program with SMP support.
Also it would be handy to know how to share memory (either manualy of through arrays) between two different progs.
Collections Hanging Around?
I've got a program that makes extensive use of quite a few collections. When the form closes and goes back to the main form that called it, it's as though the program seems to hang for a period of time that has a relationship with the number of items that are in the collection (therefore it takes longer to close the more items that there are in the collection).
I've made sure that i've set all the collections to nothing before the form closes but it still happens.
I've debugged it and once the form unloads it's not going back to it, it's as though windows is having to clear the memory.
Anyone got any clues or ideas?
Thanks
Clegg
Hanging Up The Modem
I have a particular problem with my computer. I have dial-up(not the
problem I'm speaking of) and my modem likes attain a state where the modem
is still off-hook, but isn't allowing socket connections.
What I need is a sledgehammer "ATH0" to what seems to be com3, but
everything I've tried so far detects the modem being off-hook and won't open
the port so I can hang it up.
Suggestions?
David
VB 6.0 Timer Hanging
I've noticed there seems to be an issue with using Timers in VB .Net, however, I am seeing a rather unique issue with using the Timer Control in VB 6.0.
I have a VB 6.0 application that is running as a service. It uses a timer control to wake up every 1 minute and do some processing. I also am using the NTSVC.OCX control to communicate with the NT service control manager. I have written 2 other services that are currently very similar to this and both have been working very well. The problem that I am encountering with the new service is that it seems to hang occasionally. I can start the service and it will run every minute all day long. The issue occurs when I actually do some processing with the service. The application does the processing that it is supposed to and will go back to ‘sleep’ properly. It will continue to wake up and check for anything more to process for approximately 11 minutes following the last item that it processed, at which time it goes to ‘sleep’ and never comes back. When I go and check on the service on the service control manager it is stopped, yet the log files don’t show any calls to the stop function. I am writing to a log file at the beginning of the _Timer event and at the end, along with when the start and stop functions are called. All the code is in the _Timer event as it should be. This one has really got me puzzled so any help is appreciated. The code for the _Timer event follows.
Private Sub tmrEZLink_Timer()
' EZLink code goes here...
Dim sFax As String
Dim sFirmID As String
Dim sFirmName As String
Dim sNARep As String
Dim sSenderName As String
Dim sSender As String
Dim sSubject As String
' Timers...
Dim StEZLinkProc As Long
Dim EndEZLinkProc As Long
Dim StXML As Long
Dim EndXML As Long
Dim StHTML As Long
Dim EndHTML As Long
Dim StEZInit As Long
Dim EndEZInit As Long
Dim StEZOpenSess As Long
Dim EndEZOpenSess As Long
Dim StEZTrace As Long
Dim EndEZTrace As Long
Dim StXMLValues As Long
Dim EndXMLValues As Long
Dim StAddHdr As Long
Dim EndAddHdr As Long
Dim StCrtHTML As Long
Dim EndCrtHTML As Long
Dim StSetFaxNbr As Long
Dim EndSetFaxNbr As Long
Dim StSetUsrCd As Long
Dim EndSetUsrCd As Long
Dim StSetFaxFile As Long
Dim EndSetFaxFile As Long
Dim StSetIdent As Long
Dim EndSetIdent As Long
Dim StSetProxy As Long
Dim EndSetProxy As Long
Dim StSendingFax As Long
Dim EndSendingFax As Long
On Error GoTo ErrorHandlerMain:
subLogCommand "Started EasyLink Service Processing"
StEZLinkProc = GetTickCount
Set mqSess = New MQAX200.MQSession
Set GetMQQueue = MQQueueManager.AccessQueue("COM.FAX", MQAX200.MQ.MQOO_BROWSE Or MQAX200.MQ.MQOO_INQUIRE Or MQAX200.MQ.MQOO_INPUT_SHARED)
Do While GetMQQueue.CurrentDepth > 0
Set oMsg = mqSess.AccessMessage
Set oMsgOptions = mqSess.AccessGetMessageOptions
oMsgOptions.WaitInterval = 1000
oMsgOptions.Options = MQAX200.MQ.MQGMO_WAIT Or MQAX200.MQ.MQGMO_FAIL_IF_QUIESCING Or MQAX200.MQ.MQGMO_SYNCPOINT
GetMQQueue.Get oMsg, oMsgOptions
StXML = GetTickCount
strXml = xmlParser.ParseOutXmlMessageString(oMsg)
EndXML = GetTickCount
StHTML = GetTickCount
strHtml = xmlParser.ParseOutHtmlMessageString(oMsg)
EndHTML = GetTickCount
StXMLValues = GetTickCount
sFax = xmlParser.GetXmlElement(strXml, "Fax")
sFirmID = xmlParser.GetXmlElement(strXml, "FirmID")
sFirmName = xmlParser.GetXmlElement(strXml, "FirmName")
sNARep = xmlParser.GetXmlElement(strXml, "RepID")
sSenderName = xmlParser.GetXmlElement(strXml, "SenderName")
sSender = xmlParser.GetXmlElement(strXml, "Sender")
sSubject = xmlParser.GetXmlElement(strXml, "Subject")
EndXMLValues = GetTickCount
StAddHdr = GetTickCount
strHtml = xmlParser.AddFaxHeader(sFax, sFirmID, sFirmName, sNARep, sSenderName, sSender, sSubject, strHtml)
EndAddHdr = GetTickCount
StCrtHTML = GetTickCount
strFileLoc = xmlParser.CreateHtmlFile(oMsg, strHtml)
EndCrtHTML = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Setting Fax Number"
StSetFaxNbr = GetTickCount
eslRecipient.m_FaxNumber = sFax
EndSetFaxNbr = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Setting User Code"
StSetUsrCd = GetTickCount
eslRecipient.m_UserCode = eslServerInit.SetUserCode(eslSession, 0)
EndSetUsrCd = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Setting File Location"
StSetFaxFile = GetTickCount
eslFaxFile.m_FaxFile = strFileLoc
EndSetFaxFile = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Setting Identity"
StSetIdent = GetTickCount
eslServerInit.SetIdentity eslSession, "VBEasyLinkInterface"
EndSetIdent = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Setting Proxy Server to assentor4"
StSetProxy = GetTickCount
eslServerInit.SetSMTPProxyServer "assentor4", 25
EndSetProxy = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Sending Fax to EasyLink"
StSendingFax = GetTickCount
eslJobID = eslServerInit.VBSendFax(eslSession, 8, eslFaxFile, "", "", eslRecipient)
EndSendingFax = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Done with Setting/Sending Fax"
'Next intFaxCount <----Possible future use...
If eslSession <> 0 Then
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Closing Easylink Session"
eslServerInit.CloseSession (eslSession)
Set eslServerInit = Nothing
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then subLogCommand "Server Init is set to Nothing"
End If
Loop
GetMQQueue.Close
Set GetMQQueue = Nothing
MQQueueManager.Disconnect
subLogCommand "Disconnecting from Local Queue Manager"
Set MQQueueManager = Nothing
Set mqSess = Nothing
EndEZLinkProc = GetTickCount
If Read_From_INI("Debug_Mode", "LogLevel", "Information", iniName) = "Verbose" Then
' Print out Timer value....
lTime = EndEZLinkProc - StEZLinkProc
subLogCommand "EasyLink Service Processing Time (in milliseconds): " & vbTab & lTime
End If
Exit Sub
ErrorHandlerMain:
App.LogEvent "Error in EasyLink Main Module: " & Err.Description, 1
subLogCommand "Error in EasyLink Main Module: " & Err.Description
' Handle Cleanup....
If eslSession <> 0 Then
eslServerInit.CloseSession (eslSession)
Set eslServerInit = Nothing
End If
EZLinkService_Stop
Shell ("NET STOP EasyLink Fax Out Service")
End Sub
App Hanging In Memory
Hello again everyone.
My app seems to be hanging out there in memory when it closes and I need a nice clean way of ending it. I tried using Unload Me and that did the same thing. Here is the code I have right now:
Code:Unload frmTestMain
Application.Quit
Exit Sub
More is better right?
I know its a mish mash of code but if someone could tell me a nice clean way to end it, I'd appreciate it. Thanks in advance!
~Elizabeth~
"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila "
Debug Hanging
When I run an application with an error in it – in debug mode my machine hangs for 30 seconds before returning the error, I can’t figure out why ?.
It errors instantly when in EXE mode but run inside VS and there is a HUGE delay
Kind regards
Martin
Hanging Query
I'm running a multitable query that doesn't return after 15 minutes!!! I don't see anything weird about it, but I'm not an SQL expert. I copied the syntax from a FoxPro program and modified it to fit Access. The database is attached with the 3 tables and the query that I'm having trouble with. There are 2 queries in the databse. The NOT IN query is the one that hangs. The other one runs almost instantly and it uses the same three tables. The one table does have almost 46K records, but I don't see why it would cause that big a problem.
Any thoughts would be appreciated.
Hanging On Release In Asp
I have a COM object that I built with VC++ which runs and releases when I run it with a VC++ front end application. When I run the COM object with a VB front end using:
Dim rbbtrobj As Object
Set rbbtrobj = CreateObject("RbbtrCom.Btr")
retcode = rbbtrobj.rbbtr("Integ175PVCS", 0)
Set rbbtrobj = Nothing
everything seems to work fine. However when the code is moved to asp, it runs once through, then hangs up on the second call... as if it is not being released
dim rbbtrobj
set rbbtrobj = Server.CreateObject("RbbtrCom.Btr")
retcode = rbbtrobj.rbbtr("Integ175PVCS", 0)
Set rbbtrobj = Nothing
I have tried changing the set rbbtrobj = Nothing to Server.Disconnect rbbtrobj, but I still have the same problems. If I step through the C++ COM code, the Release and CoUnitinialize are being called.... however, it still shows a reference count of 1.
Installation Hanging On Win98 With GJL####
I have an installation that runs fine, at the end of the installation is says updating system, please wait. On all other systems other than 98 it ends, user reboots all is well.
However, on 98 machines it hangs at the ...please wait... it won't go away I have waited as long as an hour. There is a program running in the process list starting with glj; it then has 4 numbers behind it. I have figured that I can cancel this process, then the installation ends normally and nothing in the programs operation is affected.
Has anyone any idea what is causing this. I don't even know why the glj#### process begins. One minor article on microsoft about it and shockwave. Thanks in advance.
Excel Hanging After Done Automating
Ok, I'm using VB to automate some tasks in Excel. Specifically, I'm using Excel to open a file and read the information is certain rows into a database. The problem is that after I'm done automating Excel, I run the quit method on the Excel object and then set it to nothing, but Excel continues to run and dominates my CPU. The next time trough the loop the creation of the Excel object fails unless I kill the previous Excel application.
The funny thing is, it only does this in certain situations. That is to say, I'm getting 4 values per row, so I have a loop to loop through the rows, and on each row I grab the value from the columns I need, store them in variables, input them into the database, then move on to the next row. Now if I only read in two of the columns (doesn't matter which two, I've tried all combinations) it won't hang at the end, but if I try to read 3 or 4 values per row, Excel hangs after I shut it down.
Here's the code that I've narrowed it down to:
Code:
'+++This is the First value read in
Sku = Trim(CStr(.Range(InvInfo(intSupplier).SkuCol & iRow).Formula))
'+++This is the Second value read in
If InStr(1, InvInfo(intSupplier).DescCol, ",") > 0 Then
Description = Trim(CStr(.Range(Left(InvInfo(intSupplier).DescCol, 1) & iRow).Formula))
Description = Description & Trim(CStr(.Range(Right(InvInfo(intSupplier).DescCol, 1) & iRow).Formula))
Else
Description = Trim(CStr(.Range(InvInfo(intSupplier).DescCol & iRow).Formula))
End If
'+++This is the Third value read in
Price = Trim(CStr(.Range(InvInfo(intSupplier).PriceCol & iRow).Formula))
'+++This is the Fourth value read in
If InStr(1, InvInfo(intSupplier).QtyCol, "+") > 0 Then
Qty = Trim(CStr(CInt(.Range(Left(InvInfo(intSupplier).QtyCol, 1) & iRow).Formula) + _
CInt(.Range(Right(InvInfo(intSupplier).QtyCol, 1) & iRow).Formula)))
Else
Qty = Trim(CStr(.Range(InvInfo(intSupplier).QtyCol & iRow).Formula))
End If
Yes, these calls are fully qualified. This code is within a With block for the Worksheet object that is set to the first worksheet in the workbook. I recently started having this problem in another Excel automation program I wrote some time ago, but it just started happening not too long ago, so hopefully if I can figure out the problem with this I can fix that problem too.
Any help you can give would be very much appreciated. Thanks.
Vb Program Hanging In Memory
Hello,
I have just created a vb program which contains 3 forms - 1 main form and 2 child forms. The main form has 2 buttons which launch the child forms using the frmMain.hide and frmChild1.show.
Everything seems to be working fine - the problem arises when I go to a child form. If I close the exe by using the x (in the upper right corner), the program stays in memory.
Is it possible to actually "close" the project out completely so that nothing is left in memory?
Thanks for any thoughts
Hanging Application Question
I have seen a few posts on here concerning hanging applications, but unfortunately none of them answer my question.
I have an application that I recently inherited, and it will commonly hang in the task manager even after the forms have been unloaded. I know this is commonly caused by unloaded forms, but the previous coder did a good job of using 'unhook' to stop subclassing and did a 'For Each frm In Forms' loop to unload all the forms, but yet the program will still hang after closing.
I know I could just throw an end statment at the end of my Form_Unload, but I would like to keep the code nice and clean. The only other thought I have is go through all 15 or so forms and make sure everything is unloaded.. but that would be very time intensive. Is there any easier way to find out what is hanging? I am using Visual Studio 6.0, but I can't find anything that would help me narrow things down.
Any ideas that you guys can offer up would be most welcome.
Thanks,
Jaime Wood
How To Stop A Hanging Service?
Hi,
I've created a service... I have a problem stopping the service - when i try, it just "hangs" repporting that it failed to stop... and then the service mannager just says "stopping" - And that goes on forever...
How do i "force" the service to stop?
Best regards...
Code Is Hanging... Help Needed
Hi the Inet1 line in my coding hangs sometime. is it because i have HTML and start dim'd as Long or is the code just written bad
Code:
Dim Gend
Dim HTML, start As Long
Gend = "http://www.vbforums.com/newthread.php?s=&action=newthread&forumid="
For pNum = 2 To 20
HTML = Inet1.OpenURL(Gend & pNum) 'HANGS sometimes it runs and sometimes it just sits there.
start = 1
more... code
Next pNum
SMTP Hanging During Execution
I've used the following email code quite a bit, usually with no problems. The latest program parses a file, and sends the results via email. Problem is, every few runs, the program hangs during the email routine. I believe it gets stuck at the .sendEmail line. No errors, doesn't crash, just hangs up. Usually takes about 20 seconds to attach the file and send the email, I've let it go a few times that it hung up and it stayed stuck for over 5 minutes before I killed it. Am I missing something in this code? As I said, I use this routine alot, just not with a file this large, sometimes it works, sometimes it sticks. grrrr
VB Code:
'send the email With SMTP .Server = "serverIPaddress" .Username = "" .Password = "" .MailFrom = "fromName" .SendTo = "toName" 'bill .CC = "ccName" 'chris .BCC = "bccName" 'me .MessageSubject = strSubject .MessageText = strBody .Attachments.Add (mailFile) lblMain.Caption = lblMain.Caption & " Sending email..." & vbCrLf Me.Refresh .sendEmail .Attachments.Remove (1) 'remove attachment so it doesnt mail again on second pass through End With
Thanks in advance.
Hanging While Cheking Database
Hi,
I am cheking the Access database for user enetrd userID.While I am looking into database in a loop.It hanging.Can any one,find wher I am doing mistake?
Private sub commad1_click()
'Added Microsoft DAO library 3.5 under project menu references
dim db as database
dim rs as recordset
dim temp1 as string
Set db = opendatabase("C: est.mdb")
Set Rs = Db.openrecordset("Login")
temp1 = Text1.text
temp1 = Rs!UserID
Do while not Rs.EOF 'whilst not the end of the file
If Rs!UserID= "xxxxxxx" then
MsgBox "User ID OK"
End If
Loop
End sub
One more question.I have one more Column called Password in Database table.How to chek both at a time?
Thanks.
< Hanging On [Timer Problem] >
Code:
' Problem:
' Before I fire I can access other features
' After I fire and set the form to invisible, I can't access my Start Button
' Something seems to he holding on to things.
' What sort of stupidy have I envoked here?
' Controls Required:
' Command1
' Timer1
' Label1
Option Explicit
Public bStopThis 'get out of loop (Lable Flash)
Public stFile As String 'file to check for content
Public stDir As String 'dir of file
Public sFired As Boolean 'used to stop timer from firing till past the minuite
'get tic count API used in flickering the label caption (Label1)
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Form_Activate()
Dim x 'store get tic count
bStopThis = False
Do
Label1.ForeColor = IIf(Label1.ForeColor = vbWhite, vbRed, vbWhite)
x = GetTickCount + 750 'flash timer for label1
Do Until x < GetTickCount Or Forms.Count = 0 'flash till
DoEvents
Loop
Loop Until bStopThis = True Or Forms.Count = 0 'kill the loop
End Sub
Private Sub Command1_Click()
bStopThis = True 'option to turn off blinking
Form1.Visible = False
End Sub
Private Sub Form_DblClick()
'kill the application
bStopThis = True
Unload Me
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
'stDir = "K:Working" 'restore when done testing
stDir = "c:" 'testing data condition
stFile = Dir$(stDir & "*.*")
'label positioning on screen as well as command button positioning
Label1.Left = (Screen.Width / 2) - (Label1.Width / 2)
Label1.Top = (Screen.Height / 2) - (Label1.Height / 2)
Command1.Left = (Screen.Width / 2) - (Command1.Width / 2)
Command1.Top = Screen.Height - (Command1.Height + 2000)
Me.WindowState = vbMaximized 'full view
End Sub
Private Sub Timer1_Timer()
DoEvents
Dim x 'get formatted current time
x = Format(Now, "HH:NN AM/PM")
Select Case x
'if these times and file is not empty and it has not been fired yet then fire it
Case "10:10 AM", "10:14 AM", "10:17 AM", "10:20 AM" 'test
'Case "08:50 AM", "11:50 AM", "01:50 PM", "03:50 PM" 'resore to this when test complete
If stFile <> "" Then 'orders in file
If sFired = False Then
Form1.Label1.Caption = "Orders To Process"
Form1.Visible = True
sFired = True
End If
Else 'nothing in file
If sFired = False Then
Form1.Label1.Caption = "File Empty"
Form1.Visible = True
sFired = True
End If
End If
'at any other time set the firesd condition to false
Case Else
sFired = False
End Select
End Sub
Access 2K .Open Hanging
I'm trying to open a recordset so that I can loop through the records updating them.
db open bit:-
Code:Set cnn = New ADODB.Connection
cnn.Open CONNECTION_STRING
Set rst = New ADODB.Recordset
get recordset bit:-
Code:If rst.State <> 0 Then rst.Close
rst.CursorLocation = adUseClient
strSQL = "SELECT * FROM " & strTables(i, 0)
rst.Open strSQL, cnn, adOpenDynamic, adLockBatchOptimistic, adCmdText
Can anyone spot why the .Open hangs - using a little bit of CPU and quite a bit of memory?
J.
The human brain is still the best search-engine...
Edited by - JA1 on 8/15/2005 1:47:38 AM
Hanging When Excel Saves?
Anyone know a way around this:
I'm making some changes to an excel file ('97) from VB(6) then try to save and close with this code:
Code:obExcelApp.ActiveWorkbook.Save
obExcelApp.ActiveWorkbook.Close False
Set obExcelApp = Nothing
Works fine for me at home (Office 2000) but hangs and I get an 'application busy, switch to or retry' box when I use it at work ('97).
Any thoughts?
Thanks, Chris
"Not for philosophy does the rose give a damn."
Inet Hanging Problem
Hi,
Here's my problem, I have this servlet that does some backend processing and fowards to a text JSP with no particular meaning. I want my vb application to make a request to the servlet so that it does the backend processing. I don't care about the html that returns back. I am using the following code to do this:
Dim b() As Byte
Dim intCount As Integer
Dim strData As String
Inet1.Cancel ' Stops any current operations
b() = Inet1.OpenURL( "Somepage.jsp", icByteArray)
Problem is that I'm the OpenUrl sometimes hangs.....and my program is just hanging. Is there a way to make the request...and move along the VB app without waiting for all the info to come back (since I don't care).
Thanks!
What Are Typical Causes Of VB Programs Hanging ?
I've read articles which talk about VB not freeing up memory correctly, resulting in low-system resources, programs hanging, and machines needing to be rebooted.
I've seen this a lot on the VB program I've been asked to maintain (on a W98 system), so I'm trying to understand if it's really VB making a mess of the system, or just a poorly written program.
Is there a list of gotchas that VB users should ABSOLUTELY steer clear of ?
The program I'm maintaining, has a lot of ReDim's in it. I've read that these should be avoided.
I'd like to get some opinions on Redim, and any other serious areas that should be avoided.
thanks
Inet Ftp Hanging Badly Please Look At Code
I have been working on this ftp and have gotten alot of help from here so first I want to say thanks to everyone. As I run this program I get some problems, sometimes the files upload and other times the don't, when I go to exit out of the program it does not acutly shut down and I have to go and do the alt. - control - deleate to shut it down. please look at the code and see what I am missing.
Code:
'button I have for sending the files to a web page
Private Sub cmdUpload_Click()
Inet1.Protocol = icFTP
Inet1.RemoteHost = "xxx.xx.xxx.xx"
Inet1.RemotePort = 21
Inet1.UserName = "xxxxx@xxxxxxxxxcom"
Inet1.Password = "xxxxx"
Inet1.Execute , "PUT " & Text1.Text & " " & GetFileName(Text1.Text)
End Sub
'this part allows me to get a file from my hard drive to send
Private Sub Command1_Click()
Dim yourfile As String
CommonDialog1.ShowOpen
yourfile = CommonDialog1.FileName
Text1 = yourfile
Text2 = GetFileName(Text1.Text)
End Sub
'this parses out the directory and such
Function GetFileName(ByVal sFilePath As String) As String
Dim iSlashPos As Long
If Left$(sFilePath, 3) Like "?:" Then
' Remove the drive letter
sFilePath = Mid$(sFilePath, 3)
ElseIf Left$(sFilePath, 2) = "\" Then
' Cope with UNC paths
iSlashPos = InStr(3, sFilePath, "")
If iSlashPos = 0 Then
' No slash after the share so no file
Exit Function
Else
' Remove the server and share
sFileName = Mid$(sFilePath, iSlashPos)
End If
End If
' Now that we've stripped it down to a simple path
' find the last slash and grab whatever's after it
iSlashPos = InStrRev(sFilePath, "")
If iSlashPos > 0 Then
GetFileName = Mid$(sFilePath, iSlashPos + 1)
Else
' No slash, so the whole thing is a filename
GetFileName = sFilePath
End If
End Function
Thanks for any help you can give me on this.
Robert
Excel Process Hanging Issue
Hi all,
I posted here before on this same issue but cant' seem to find the thread. I know there's also similar thread open right now by someone else, but i didn't wanna threadjack with my own code.
anyway I've read through the tutorial and have made my code as oExcel oriented as possible. (i.e. no implicit references to the 'application' object) However, I'm still getting this excel.exe process problem. Whether I have my app close off the excel sheet (i.e. call .Quit) or not, i still have excel.exe hanging. I need my app to release the link to this process so that when the user closes off the excel sheet, the process gets killed.
My code's a bit long but I'm going to post it because I've done all can, have read though a TON of posts and tutorials and am completely stumped.
(see next post for code)
Problem: Infinite Loop/App Hanging
The following code seems to be going into an infinite loop as it keeps hanging...Does anybody have an idea why this is, and how i can fix it??
Code:
Private miSeconds As Integer
Private mbContinue As Boolean
Public temp1, temp2, temp3, temp4, temp5, temp6 As String
Public Sub cmdStartTimer_Click()
Do While mbContinue
info
Loop
End Sub
Private Sub Form_Load()
mbContinue = True
miSeconds = 0
tmrTimer.Interval = 1000 '' 1000 milliseconds = 1 second
End Sub
Private Sub tmrTimer_Timer()
miSeconds = miSeconds + 1
If miSeconds = 5 Then
mbContinue = False
End If
End Sub
Public Function TEMP()
temp1 = ""
temp2 = ""
temp3 = ""
temp4 = ""
temp5 = ""
temp6 = ""
End Function
Public Function info()
Dim fso As New FileSystemObject
Dim f As File
Dim fsostream As TextStream
Dim strLine
Dim savedFreq As Variant
Dim temp1, temp2, temp3, temp4, temp5, temp6 As String
Set f = fso.GetFile("C:Documents and SettingsAdministratorDesktopJanuary Version of CodeSavedStations.ini") ' Get the file for reading
Set fsostream = f.OpenAsTextStream(ForReading) '
'TEMP
temp1 = fsostream.ReadLine
temp2 = fsostream.ReadLine
temp3 = fsostream.ReadLine
temp4 = fsostream.ReadLine
temp5 = fsostream.ReadLine
temp6 = fsostream.ReadLine
fsostream.Close
Set fsostream = Nothing
Set f = Nothing
Set fso = Nothing
Text1.Text = temp1
Text2.Text = temp2
Text3.Text = temp3
Text4.Text = temp4
Text5.Text = temp5
text6.Text = temp6
End Function
VBA Program Hanging Consuming All The Memory
Hello All,
I know this question is related to VBA Excel Coding and not VB but please dont move this question to Office Development. If someone can help me in making my code better then please visit the following thread :
http://vbforums.com/showthread.php?t=412005
Thanks,Vikas
Active-X Is Hanging Application On Close
I found an activex control that allows me to play DV files in my VB application. Once i placed the control on the form anytime I go to stop the application from within the VB environment VB hangs for about 5 - 10 seconds before getting me back into the development UI ????
Same thing is happening once it is compiled. When a user closes the application it hangs for 10 seconds before they can restart the app
Any suggestions beyond find another activex control?
Hanging While Loading Corrupt Photo
Hi All,
I have created a program that takes user submitted photos, resizes them
both in dimensions and file size, and then inserts them into an SQL (7 &
2000) database.
Once in a while one of the user photos will be corrupt when loading into
memory and the program will hang.
Does anyone have something similar to the Try - Catch - Fail from .NET but
for VB6?
Thanks!
|