In my code, I import data from an excel worksheet into a SQL table. My code has worked fine up until yesterday. I haven't made any changes to my code and my customer says that they haven't made any format changes to the worksheet. The problem is when I open the recordset with my excel data...
I know that I have run across this question before but can't seem to find it now that I need it.
I need to check to see if and excel file is open and if it is, I need to close it.
Can someone help me out.
Thanks.
You need to actually add a new form. The new form must be the MDIForm. The MDIForm is a container for all the MDI Child forms. You can load your first form inside of the MDIForm when your application loads so your application looks the same. Let me know if you would like any help making it...
I have a table of loan amounts. There are times when I need to find the group of loans that total or come closest to an amount I specify such as $2,000,000. I am trying to come up with logic to do this and need some ideas.
Thanks.
Ok, I just found another thread that gave me the answer. AndyGroom, here is the solution:
Add a reference to the Script Control 1.0
Dim objSc As ScriptControl
Set objSc = New ScriptControl
objSc.Language = "VBScript"
'Evaluate the expression
Dim dblResult As Double
strCalc =...
No, I'm not using excell. I am using a grid control. I know how to loop throgh the selected cells but the calculation that the user enters could use any operation (+, -, *, /). They actually enter the operation and a number ie: "+ 3" or "-.05". I need to be able to take...
I have a grid that i allow the user to select cells that contain numeric values to perform a calculation on. When they click a button, I bring up another form that they enter the calculation in ie: "+ 1". That tells me that they want to add 1 to all the cells they selected. I do...
I am evaluating the Janus grid before I purchase it. I have never used it and don't even know how to populate it. I have two columns; the first is just a text field and the second I want to be a dropdown list. I have set the second column to be a dropdown in the properties box. I don't even...
In doing some searching around, I have discovered that you can only sort consecutive columns and all in the same direction. If this is the case, this won't work for what I need to do. Does anyone have any ideas on a different way to do this? I have a recordset that I load into the flexgrid...
Is there a way to sort two columns in the flexgrid? I need one column sorted ascending and the other sorted descending. I populate the flexgrid with a recordset but several of the columns are calculated fields that I compute in code and not in the query.
Is there a way for me to save a file and overwrite an existing file without a prompt to overwrite?
I am creating an excel file and when I saveAs, I do not want it to prompt to overwrite but I do want it to overwrite the existing file.
xlSheet.SaveAs "c:\FileName.xls"
Thanks.
Is there an easy way to import data from a worksheet into a SQL table through VB? Currently I open the table and the worksheet and loop through the worksheet and add a new record for each row. This is too slow and am looking for alternative ways to do this.
Thanks.
I know this is an easy question but I forgot how to do this. How do you change the drive in the dir list box after you have selected it in the drive list box.
Thanks.
I am attempting to open an excel worksheet and update the links using VB6. For some reason the Excel.Application is not being created and I receive the following error:
<Object variable or With block variable not set>
Below is my code:
Private Sub UpdateLinks()
Dim ExAp As...
Yes, this is a mortgage payment calc and the part that I posted was only a small part of it. I broke it up to make it easier to read and follow. I did get it working this morning, though.
I now need to calculate the APR but cannot find the formula to do this. Does anyone happen to have this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.