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




Trying To Get A Userform Program To Activate Immediately


I am have designed a simple "userform" program. The only way I can get it to open is by putting a button in the Sheet 1 section of the excel project.

If possible I would like a user to be able to just double click the xls file, and then the "userform" would automatically launch.

Any Ideas???




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Excel 2000 Run Code Or Activate Userform In Different Workbook
Hi all,

I have a workbook containing information which I need to paste into several other workbooks (not a problem). On each of these workbooks I then want to run sub routines or launch a userform they contain.

I have tried using Code:Call ??? and Code:Application.Run(???)

I have the basic syntax MyProject.MyModule.MySub but can't get it to work. I believe you can't run a private sub but have changed this (is this right?).

Questions:

1.    Do I need to add any specific reference tools.
2.    Does anyone have any example code using just text eg "VBAProject.Module1.Macro1", a mixture of variables and text eg Variable1 & "Module1.Macro1" and just using variables.
3.    Can you run code contained in a userform eg "Userform1.Stage1_Click".
4    Do I need to (through VBA) reference the specific workbooks somehow.

As always any help given is much appreciated.



Rob.

Find Out If Program Is Running, And If It Is Not, Activate The Program
Okay, i have searched for over 5 hours, and cant find out how to make with an visual basic program how to:

find out if a pragram is running. and if it isn't running, activate the program.

i want to do this with a timer
so i can leave my computer and the program cheks every minute if the program is running and if not, it activates the program

Auto Activate Program
Does anybody out there know how to let a program auto start after reboot. similar to norton program. i need to to run as a background process. Thanx

Activate Program From Website?
Hi,

I am the owner of a checkers website http://checkerscentral.hypermart.net and I would really like to add a 'checker game animator' to the features of my site. It would help beginners to see the various games/problems that are posted there.

My question is this, what do I have to do to be able to activate a program from a website? If I can get the users to download a program I would want the program to automatically load up every time a 'game' or 'problem' link is clicked and then allow the user to go through the moves as they wish.

Could the program be a standalone application? Or does it have to be active x? Please let me know, and if possible an explanation why.

Thanx in advance.

Activate My Program And Bring To Foreground While In Another App.
I've written an application in Visual Basic 6 that is essentially an add-on program to another application (Autodesk Inventor to be specific, which is a 3D Modeling program). Essentially, what I have done is integrated a timer into my application that checks to see if a certain command in Autodesk Inventor is active. Therefore, the user is working in Autodesk Inventor creating their 3d models; once they start a specific command I want to bring my program to the foreground (it will already be running and displayed in the taskbar). I have no problem checking to see if the appropriate command is active but I'm having trouble making the program visible on the screen since my code to activate the program simply causes it to flash on the taskbar and not become visible on the screen.

Here is the code from my timer event (executed every second):

Set objInvApp = GetObject(, "Inventor.Application")
If objInvApp.CommandManager.ActiveCommand = kCreateHoleCommand Then
Me.Show ' Have also tried AppActivate Statement
End If

Can someone assist?

Thanks,

Ryan Small

Using The ShellExecute Command To Activate A Program
Heres my situation. I have a csv file that I want to read and put into a SQL Server 6.5/7 database. I already have a VB app running and I was going to make this function part of the existing program. My question is how exactly would I do this? Code examples would be great as I have no idea where to start. Some other things that might be important: I want to use the BCP utility that comes with SQL Server because this program is supposed to take care of reading the file and putting into the database. The problem I have is writing code to get to that point. (i.e. Opening connection..activating shell command for BCP,..closing connection.) This means I need some code from beginning to end. If anyone has even a remote idea on how to do this, I would greatly appreciate any sugggestions. Also, I have searched alot of VB code sites and can't seem to find any for this example. If you know of one that does, let me know.

Thanks,
Greg

Activate Event Called Only When Program Is Compiled.
Greetings all!

I ran into a really weird problem that took me about one day of work to fix. Byt the thing is, I still don't understand why I got this weird behavior!?!?!?!?!? So I tought that maybe some of you could provide me with another plausible explaination than my computer is posessed!

I work with MDIforms. When I click a button, it is supposed to open a form. So, what I do is loading an MDIchild into a collection. After doing that, I call a my custom function "LoadData()" from the MDIchild to load some datas (duh! that really sounded like a bad help file I read once...).

Now, here is the funcky part: when I run from the .exe file, the sub "Form_Activate()" is called right after my function "LoadData()". BUT, if I run the program from the VB developpment (I call it debug mode...) environment, "Form_Activate()" is NOT called!!!!

If anybody could tell me why the behavior is different between compiled version of the app and the debug mode, that would be great!!! Or, at least, if someone have seen something like that, just tell me cuz I really think about calling a priest so he can exorcit my computer!!!!


Thanks!
)

Make Specific Links Activate Your Program.
Ok I am trying to make it so if a link says something along the lines of jdh://...

open my program. Like mIRC does with irc://. I looked through the registry and saw how other programs did it and I don't feel like doing extreme testing to the registry, because if I don't know what I am doing I tend to mess up. So does anyone know the appropriate registry keys to add to make my program to do as I wish.

Activate Program In System Tray With Mouse
Hi guys

I have a program that resides in the system tray.

I want to activate that program by pressing both left & right mouse buttons. When that action takes place the program should be activated, popup and be ready to use.

I do not know a lot about API's, but I guess that the answer would be found there.

Anybody that can help me with code / examples for something like this?

Thanks!
dwsteyl

Activate A Hidden Form From Aanother Program
Ive written 2 programs.....one hides itself......Is it possible for the second program to activate (show) the first program when its been hidden. Appactivate("Form1") work great if the form is behind another window but if its been hidden, it gives a runtime error 5

Excel VBA: Can A UserForm Be Used As A Program Menu?
Can a UserForm (with Button Controls) be used a macro menu?

What I want to accomplish:
1. minimize the main coding and run procedures with subroutines.
2. Use a UserForm as the MainMenu to call all procedures and return back to the MainMenu (having a command button as an exit).

Something like this:
1. Initialize Routine
2. MainMenu (i.e.: MainMenuForm.Show)
3.Close Routine

Problems I am having:
1. Only showing one Userform.show command. (user may decide to do only one or a number of procedures). Right now I have to show a number of .show commands in succession to accomplish every procedure possible. As you can tell this is not the best way to do this---can it be looped somehow to limit the coding, with an exit on selection of the "quit" command button selection.
--Would the .hide statement be best for this issue?

Userform Blank During Running Program...?
I have a large program. In the beginning, I show a form...


Code:
[color=Navy]frmStatus.show[/color]

However, while the program is running, the form shows, but is all white. After the program is done running, I can then see the contents of the form and it shows the final statement in the form's textbox, which is "Tests Completed!!"

I should be able to see some other variables on the user form throughout the test. Why is my form all white/blank until the end of the test? Its almost as if the screen isn't updating or the focus is not on the userform....

Please help....

Activate, Ye Stubborn Cell! ACTIVATE I SAY!!!
I'm glad to have one of my trademark needlessly complicated issues to present to you all. In my form is a combo box ('EventMenu'), two text boxes ('AskIt' and 'Moofus') and a button. Nice users will enter a string into the 'AskIt' box and my program will find the cell (all I really want is the row) where that string is found. Users also will have entered text into 'Moofus'; and this text will be entered into a cell on whichever row the AskIt string was found. Which cell, you ask; for there are many. Which cell the Moofus string ends up in depends on what the user selected from the EventMenu combo box.

Here is the script for when the button clicks:

Code:
Private Sub Findit_Click()
Loogit = Askit.Value
Hepcat = Moofus.Value
Set C = Worksheets(1).Cells.Find(Loogit, LookIn:=xlValues)
Showit.Value = C.Row
If EventMenu.SelText = "ONSITE" Then Cells(C.Row, 13).Activate
If EventMenu.SelText = "STARTUP" Then Cells(C.Row, 14).Activate
If EventMenu.SelText = "LOAD" Then Cells(C.Row, 15).Activate
If EventMenu.SelText = "MKEY" Then Cells(C.Row, 16).Activate
If EventMenu.SelText = "PROD" Then Cells(C.Row, 17).Activate
ActiveCell.Font.Bold = False
ActiveCell.Font.Size = 10
ActiveCell.Value = Hepcat
End Sub

In my dream world, they enter 1234A into AskIt and the program finds 1234A on row 11; the user selected "MKEY" from the Menu and thus the cell at R11C16 is activated and populated with Moofus.Value.

But all that happens instead is that the Moofus.Value ends up in whichever cell was active when I ran the macro.

Wha happened?

Pause Vba Userform, Manual Intput In Excel And Then Again With The Userform ??
hello you all, It's me again

I have had many probs, but the most are gone now, thx to you guys.

Next problem is this:

I use userforms to collect data from files and also user entries.
After a while the user should be able to enter some data manualy in the sheet, but the userform should be still active, because there are some global and other values i would like to keep.

Is it possible??

I would like to put some pause button in vba-userform and on the sheet a button to continue.

Thx 4 the help

Help Immediately
We are using Visual Basic 6.0(SP3). We created a package for a Standard EXE project. We referred Activex Dlls in that Standard EXE Project. The Dlls are given Binary Compatibility. We installed the package in a system. While executing the application the following error
occurs. "Class does not support automation or does not support expected interface." Error No :430.
What is the solution for this? We also registered the Dlls on that syste. In the system in which we created the package, the application is working fine. Please help immediately.

Thanks for any help.
Sujatha

How To Update Immediately?
i wrote two files:
1)first form use combobox to show the data from database and link to second form.Second form shows the database (create run-time ADO object) that can add and modify data during run-time. problem arised: why the combobox cann't update instantly? It update only after i close it and reopen. why property should i change?

2)first form use data report designer to display the database(used Data Environment , drag-and-drop to data report designer).Second form shows the database that can calculate the data during run-time(used MSJet.OLEDB.3.51 with portable address) . problem arised: why the report cann't update instantly? It update only after i close it and reopen. why property should i change?

Cannot Update Immediately
When I use ADO connection to execute the SQL statement, I find that it needs to wait for few seconds to update to database
e.g.
cn.BeginTrans 'cn is ADO connection
cn.Execute "Insert into Table(.....) values(.....)
cn.CommitTrans

However, when I use DAO, it update immediately!!!
e.g.
ws.BeginTrans 'ws is workspace, db is DAO Database
db.execute "Insert into Table(.....) values(.....)
ws.CommitTrans DbForceOSFlush

What's wrong with my ADO coding??

Need Help Immediately, If There Is Anyone That Can Help, Pleeeease Help Me!
Can anyone tell me what I am doing wrong? And Tell me what I should have as the right code

Read the following instructions, my code is below it.


The third button will bring the user to a form that allows entry of Student marks into a file. Upon indicating that the user has completed entering marks for one student have the program calculate the average mark, display that mark in a message box and then clear the screen to allow for a new student.
The must also be a button to allow return to main menu.
My code is:

Private Sub cmdAddToFile_Click()

Dim strName As String
Dim intMarks As Integer
strName = txtStudentName.Text
intMarks = Val(txtMark.Text)


'Open file to add student marks to it (append)

If IsNumeric(txtStudentName.Text) Then
MsgBox "Please Enter Text, not a number", vbOKOnly, "Error"
Else
If txtStudentName.Text <> "" Then
If IsNumeric(txtMark.Text) And Val(txtMark.Text) >= 0 And Val(txtMark.Text) <= 100 Then
Open "C:My DocumentsStudentMarks.txt" For Append As #1
Write #1, strName, intMarks
Close #1
Else
MsgBox "Please enter a number from 1 to 100"
End If
txtMark.Text = ""
txtMark.SetFocus
Else
MsgBox "Please Enter Student Name", vbOKOnly, "Error"
txtStudentName.SetFocus
End If
End If


End Sub

Private Sub cmdAverage_Click()
'Displays student average mark in a Message box and student name in a label
'Totals Student marks
'Give an average in a message box
Dim msngTotal As Long
Dim mintCount As Integer

Open "C:My DocumentsStudentMarks.txt" For Input As #1

Do Until strName = txtStudentName.Text
Input #1, strName, intMarks
lblTitle.Caption = strName
Loop
If strName = txtStudentName.Text Then
msngTotal = msngTotal + intMarks
mintCount = mintCount + 1
MsgBox ("Your Mark is:" & " " & msngTotal / mintCount)

End If




Close #1


txtMark.Text = ""
txtMark.SetFocus
End Sub

Private Sub cmdDone_Click()
Dim msngTotal As Long
Dim mintCount As Integer

Dim strYesNo As String
strYesNo = MsgBox("Are you done entering Student Marks?", vbYesNo + vbQuestion, "Confirm Done Entering Marks?")
If strYesNo = vbYes Then

Open "C:My DocumentsStudentMarks.txt" For Input As #1
Do Until EOF(1)
Input #1, strName, intMarks
lblTitle.Caption = strName
Loop
Close #1
Call cmdAverage_Click
End If



End Sub

Cant Update Immediately
The system cant update immediately unless i exit the program in Vb 6.0

Help Immediately!!! Memory Game
I am writing a program that will display a single digit for a time of 5 seconds. After 5 seconds, the user has to type in what number he/she saw.
If the user is right then a 2 digit number is diplayed... The digits increase until the user messes up. If the user messes up, they can click on Go again.

Any ideas on how to do this, i would really appreciate it...Thanks!!!

How To Know The Network Fail Immediately.
Hi there,
In my program I must connect to SQL database from server. When the server failed or there're something wrong with the network, and I open a connection to this databse my program hangs up. So that I want to know is there anyway to recognize immediately when the network's fail (like Microsoft they let me know as soon as this happens)

Immediately Terminate The VB Application
Hi All,
I have one critical problem..i am using MDI application and there are more than 30 child forms under it..the problem is when i close the application,though it disappers from screen,it is not terminating properly... it remains in taskmanager..

The problem is, if i again have to open my application immediately after close..it is not at all possible since i am checking for its prev instance...

All i have to do is go to task manager and kill the application and then start the new one...

Y is this so? what could be done to kill the application immediately..

Thanks in advance

Using A File Immediately After Replacing It.
Iím having a problem with copying files and then immediately using them. It doesnít seem like to code allows enough time for the file to be copied. Is there a way to pause the code until the file has been copied and then continue? I donít want a noticeable delay in the code execution so I donít really want a timer to wait for 1 second then continue.

Dtp Picker Does Not Refresh Immediately
Hi

I have a strange problem on a visual basic 6.0 form when i am using dtp picker
when the I selects a time in and time out from a dtp picker control if the focus is shifted from the dtp picker control within 3 seconds then the changed time does not display it goes back to 0:00 hours

is there anyway of refreshing the selected value immediately as soon as the user changes the time and uses tab to shift the focus



Thanks

Print Immediately And Networking
Hello Guys,
I Created my program but i dont know how to code about networking procedure and to print the report immediately to the printer directly...pls try to help

Stop Thread Immediately
Does anybody know how to kill a thread in vb.net? I know I can call threadname.abort but that does not stop the thread immediately. Is there a way I can force a thread to stop no matter what it's doing?

Thanks,
Chig.

How Do You Immediately Update A Registry?
I am trying to update the following the Path registry using the code below. I can see the changes when running regedit, but for some reason my app does not immediately see the changes for 10+ minutes. My app uses Domino Com to send emails and I need to change the path registry to point to where the Notes.ini and id files are located. Any ideas?

Private Sub Path()

SaveSettingString HKEY_LOCAL_MACHINE, "SYSTEMCurrentControlSetControlSession ManagerEnvironment", "Path", "h:lotus
otes;"

End Sub

'APIs
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long

'Sub to save settings
Public Sub SaveSettingString(hKey As Long, strPath As String, strValue As String, strData As String)
Dim hCurKey As Long
Dim lRegResult As Long

lRegResult = RegCreateKey(hKey, strPath, hCurKey)

lRegResult = RegSetValueEx(hCurKey, strValue, 0, REG_SZ, ByVal strData, Len(strData))

If lRegResult <> ERROR_SUCCESS Then
'there is a problem
End If

lRegResult = RegCloseKey(hCurKey)
End Sub

How Do You Immediately Update A Registry?
I am trying to update the following the Path registry using the code below. I can see the changes when running regedit, but for some reason my app does not immediately see the changes for 10+ minutes. My app uses Domino Com to send emails and I need to change the path registry to point to where the Notes.ini and id files are located. Any ideas?

Private Sub Path()

SaveSettingString HKEY_LOCAL_MACHINE, "SYSTEMCurrentControlSetControlSession ManagerEnvironment", "Path", "h:lotus
otes;"

End Sub

'APIs
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long

'Sub to save settings
Public Sub SaveSettingString(hKey As Long, strPath As String, strValue As String, strData As String)
Dim hCurKey As Long
Dim lRegResult As Long

lRegResult = RegCreateKey(hKey, strPath, hCurKey)

lRegResult = RegSetValueEx(hCurKey, strValue, 0, REG_SZ, ByVal strData, Len(strData))

If lRegResult <> ERROR_SUCCESS Then
'there is a problem
End If

lRegResult = RegCloseKey(hCurKey)
End Sub

Form Does Not Unload Immediately ??
This is something I have been trying to solve for sometime now and it does not get resolved completely.

Scenario:

I am calling Unload Me inside a click event before the event processes some calculations (which is heavy like going through max of 150000 records and doing joins and stuff) in Load event of another form before the new form is shown.

Problem:

The old form (from where I am sending the click event) hangs in the background, kinda blurred, but looks bad while the working animation is running. It eventually unloads and disappears when the new form is shown.

Looking For:

Anyone know how I can make the old form disappear as soon as I unload it? I do not like the fact that it is hanging in the background half dead, hald alive.

Thanks to all in advance,

S

Help Me Out Immediately(Webbrowser Control)
Hi
I have been using a Webbrowser control for printing from a data control . The data from the data control is formatted and put in an html file (as a table ) and the html file is displayed in the browser
If the no of columns (table columns in html) is large the report is being displayed in the webbrowser control but while printing it is not printing all the columns .
Reply immediately

Compatibility Problem. Help Immediately.
We are using Visual Basic 6.0(SP3). We created a package for a Standard EXE project. We referred Activex Dlls in that Standard EXE Project. The Dlls are given Binary Compatibility. We installed the package in a system. While executing the application the following error
occurs. "Class does not support automation or does not support expected interface." Error No :430.
What is the solution for this? We also registered the Dlls on that system. In the system in which we created the package, the application is working fine. Please help immediately.

Thanks for any help.
Sujatha

Database Wonít Update Immediately
I am saving Recipe Name in a table. Then using that recipe names autonumber Field value as a foreign id in another table (ingredient table).

But as soon as I update Recipe Name Table ado control wonít read the autonumber Fields value from the table it is taking some time to get refresh.

How can I get rid of this matter?

DAP Combo Box Does Not Immediately Refresh
Hi. In my DAP, I have a a combo box from which the user can select a specific record to view based on the value SupervisorManagerName. My combo box works fine in that respect. The user clicks on a name in the combo box, and the record is populated with the correct record.

When I add a *new* record, however, the combo box does not refresh immediately to include the new SupervisorManagerName in its list. Once I close the DAP and then reopen it, the new SupervisorManagerName is included in the combo box, and I can select the name to pull up the record.

Any suggestions on how to get the combo box to refresh immediately upon adding/saving a new record without having to actually close and then reopen the page?

I am able to make this process work using VBA and a regular Access page, but can't figure out how to do this using vbScript

If this helps, I'm including the VBA code that works in Access. I can't figure out how to convert this to vbScript and my Data Access Page. Thank you soooooooooo much for any suggestions. It's driving me crazy

VBA version

General Module:
Public Function IsOpen(ByVal FormName As String) As Boolean
'returns True if the specified form is open in Form view

Const DesignView = 0
Const ObjStateClosed = 0
IsOpen = False

If SysCmd(acSysCmdGetObjectState, acForm, FormName) <>_
ObjStateClosed Then

If Forms(FormName).CurrentView <> DesignView Then
IsOpen = True
End If
End If
End Function

Code from Form:
Private Sub Form_AfterUpdate()
'Refresh the form to immediately reflect additions, deletions or changes
'Using the Refresh & Requery methods and calling the IsOpen user-defined function found in the General module

If IsOpen("SupervisorManager") Then
Forms!SupervisorManager.Refresh
End If

If IsOpen("SupervisorManager") Then
'refresh form to show the value in the
'supervisormanager TEXT box
Forms!SupervisorManager.Requery
End If

End Sub

Any suggestions on how to make this work in vbScript/DAP?

Again, thank you very very much.

How To Cancel A Function Immediately?
I have a class module with some functions which do different things and someone takes some time (depends on user settings). Now, how to stop running the function (if the user want this) from an external program? I mean, I want to cancel the class operation immediately.
Thanks for any help!
Greetings...

Immediately Flushing Buffers To Disk
I have this 'small' problem with Windows 98.
I have an app which needs to interact with another app and it's time critical.
It writes stuff to an ini file and then tells the other app (which I didn't wrote) to read the changed values.
On 2k,XP and 2k3 it works like a charm, but on Win98 it doesn't and it still reads the old values.
However, WritePrivateProfileString returns non-zero (means ok).
So the solution till now is that when the user has Win9x that it throws a messagebox with a message that everything wend ok when the return value is non-zero. And that seems to force my app to write the buffers to disk before telling the other app to read its new settings.
Still with me? Good
I've tried to force to flush the diskcache but no luck so far. And already then i ran out of ideas what to do, instead of throwing a messagebox. You'll have to agree with me that that's an ugly way to solve things.
Any help would be appreciated

Refreshing The Records Immediately On MSFlexGrid
Hi everyone,

I have preparing a VB6 project which have MSFlexGrid Form and Form(normal) controls.With MSFlexGrid the data is loaded on it.when i dbclick any record on MSFlexGrid,the form(normal) appeared(edit,add,delete record) appears.i would like to ;

when i edit,delete or add any record;the record should be appeared on MSFlexGrid immediately.but onlly when i close the MSFlexGrid form and open it again i can see new(or edited) record.i tried the refresh method but it does not work.

Could you please help me?

Thanks in advance

How Can I Unload A Form And Launch It Immediately?
Hello, Everyone:
I want to unload myform and launch it immediately. The reason that I am doing that I need to try to connect OPC server again.
It doens't seem to work properly. Would someone be kind to help me out?
Thank you very much!
Charlie

Code:
Private Sub Timer1_Timer()
If (Not L141Read) Then
L130Changed = False
End If
If ((Not L141Read) And (Not (L130Changed))) Then
Debug.Print "Time out!" & Now
Unload Me
Form1.Show
End If
End Sub

How To Let The Records Show Up Immediately In The DataGrid?
Let's say I have a form which adds data into the Recordset; this recordset will be displayed in the Datagrid.

But the problem is, the added data do not show up in the datagrid immediately; the user have to wait for a while before the data appears in Datagrid.

Are there any ways to let the data appear imeediately in the datagrid?

How to solve this problem?

Please Advise. Thanks a lot.

How To Make Tooltip Appears Immediately
hi.. if you set a control's tooltiptext to a string, then when the mouse pointer is above the control, the tooltiptext will appear after about a second. Is there any way to make the tooltiptext appear immediately without having to wait for a second? thanks

How Can I Delete Rows In ACCESS Immediately?
I'm using this code to delete a row in the database, after this I need update the listview which shows the contents of the database. How can I force the program to finish 'db0.execute', then continue? It seems 'db0.execute' will not pause the program, so the following code for updating listview will NOT work correctly (it reads the database).

thanks




VB Code:
Dim db0 As ADODB.ConnectionDim sqlstring As Stringsqlstring = "DELETE * FROM Info WHERE [LastName]='" & _            Trim$(txtLastname.Text) & "' AND [FirstName]='" & _            Trim$(txtFirstname.Text) & "' AND [DateReceived]='" & _            Trim$(txtDateReceived.Text) & "'"            db0.Execute (sqlstring)

Deleting A Folder Immediately After Creating It
hello,
I am creating a folder using the File System Object and this is successfully created at C:VBS. Now I want to delete the folder manually using the Windows Explorer immedialtely after the execution of te vb program and creation of the folder but i am getting an error message the source is in use cannot delete the folder......
I need to delete the folder asi am testing my program......
Any body anyy ideas why is thisso......

Data Report Help Needed Immediately
Crosbj !!!
Thanks cause I didn't notice that there were few built in function ..... for paging and dates ahahahahaha

what a crazy guy i am .... hehehe

Print #filenum Doesnt Do It Immediately??
Hi guys,
I have a logging function that will log anything i choose to the logfile, i have a bit of a problem with it..
all it does is use PRINT #File to output to the file..
the logfile will print to a certain point (halfway through a line) then stop, until i close my program.. it goes thru the print statement, i checked.. it just wont do it immediately... anyone know a solution.. code is below for my log function btw..

Code:
Public Function do_log(message As String)
If Not NOLOG Then Print #LogFile, Format(Date, "mm/dd/yyyy") & " " & Format(Time(), "hh:nn:ss") & " " & message
End Function

Ok, update, It now doesnt output _anything_ until i close the form.. (it did before, just missed about 3 lines) any ideas?

[Edited by CAPHS on 10-14-2000 at 07:03 AM]

.Execute Statement Not Committing Immediately
I am writing a program that does several simple UPDATE statements and then does an .execute command immediately after each one.

I have to connect to 2 different Oracle 8i databases in my program.  My DBA has set up a view to one of the databases in the other so I now only need one connection and can access the tables through the view.

Here's the problem:
When I connect directly to the database, immediately after I execute the statement, I can query the table and see the results.  

When I update the view to the table, the updates are not shown immediately after the .execute statement.  VB seems to buffer the updates and doesn't commit them until I exit the subroutine.

Has anyone else had this issue?  Is there a way to get VB to commit the update immediately?

Thanks,

drost

Get Newest Primary Key Immediately After Db Insert
Hi,

How would I retrieve the newest primary key (an autonumber field in a SQL7 db) immediately after a conn.execute insert command is executed?

Thanks,

Mike

Excel Closes Immediately After Startup
Hi,

I have an excel document with a lot of vba. It is a shared file over a local network.

Recently we got 2 new machines (windows xp) and when trying to open the document on these machines, excel starts to open but then immediately closes. The same document can be opened without problem on other machines.

The office version is '97 and the other machines run NT or 2000.

One other thing, this is somewhat intermittent. The file has run on occasion.

Drew

How To Make Printer Prints Immediately From VB
I use the printer-related API functions in my VB program, and it seems not working as expected, because the printer does not print immediately after the statement similar to "EndPagePrinter lhPrinter" is executed. Could anyone please help?

How To Remove My Icon In The System Tray Immediately.
Is there any other way of removing system tray icons besides Shell_NotifyIcon DELETE?

Update In DataGrid Not Reflected Immediately In Database?
My I.T. Manager got problem with the DataGrid, supposedly when he had updated a record in the DataGrid he wants it that the changes would immediately be reflected to the database without moving to the next record, I have discovered that Resync is able to to that but when I try to automate it with...


VB Code:
Private Sub adoDeeU_FieldChangeComplete(ByVal cFields As Long, ByVal Fields As Variant, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)    adoDeeU.ResyncEnd Sub


I am encountering this error...


Code:
Consumer's event handler called a non-reentrant method in the provider.


Anyone who could provide me a workaround for this?

Thanks!

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