Hi, I am looking at a list of options using a "Select Case" function in VBA, and based on the result, want to put data in a certain row on the spreadsheet. I could put
Case 1
Range("h3").Value = txtDate.Text
Range("i3").Value = txtTime.Text
Case 2
Range("h4").Value = txtDate.Text...
OK, I didn't make myself clear, sorry.
Let's say "A1" contains a number. "A2" and "A3" contain different numbers. If A2 is bigger than A3 then I want to change the value of A1, otherwise I want to leave A1 as it is.
Any suggestions?
Richard
How do I use an "If" to either copy the contents of a cell into another cell, OR leave the destination cell untouched, depending on a certain logical test. I see the syntax of the "If" fnction is "If(logical test, value if true, value if false)", but what if I don't want a 'value if false'? If...
I have been sent an employee listing as an Excel file. The first column is in the form of:
Jones, Peter A
Smith, Richard Alan
Johnson, Bert
etc etc...... I want to split this into three columns. Last name, First name, middle name or initial (Which will sometimes be a name, sometimes an...
As a follow-up - the error appears three times as the form opens, and appears to be triggered by a recordset request. The code is....
Dim rs As DAO.Recordset
Dim rs1 As DAO.Recordset
Dim rs2 As DAO.Recordset
Dim db As DAO.Database
Dim n1 As Double
Set db = OpenDatabase(App.Path &...
Hello, this is kind of a follow on to my previous thread about moving a project in development onto my laptop.
After ensuring that the Microsoft DAO 3.6 Object Library is properly referenced, I no longer get the "ActiveX component cannot create object" error - this was a critical error that...
The original database was written in Access 97. Would VB5 and the DAO 3.6 Library be ok with an Access XP database, because I have Office XP installed and could update the database no problem.
Richard
ActiveX Data Objects 2.x wasn't checked, but Microsoft DAO 3.51 Object library was. I checked 3.6 as well, and got an error that it was incompatible with a prior reference. I unchecked 3.51, and now instead of my 'cannot create object' error, I get "Can't open a database created with a previous...
Both DAO360.dll and DAO350.dll are in the common files folder. Where should I look for the registry entries for them ?
I wasn't explicitly declaring the databases as DAO objects - I've just got them declared by :
Dim db as Database
Dim rs as Recordset
I wasn't aware it was advisable to do so...
Hi there. I have a VB5 database application that I've been working on for a while on my desktop, and it has been coming along ok. When I run it (uncompiled) it runs as expected.
I have now installed VB 5.0 on my laptop to work on it on the road. However, when I try to run it now, it crashes as...
How can I set the width of individual coulmns at runtime? It seems to me that the line
dgRecords.Columns(1).Width = 2000
Should set the width of the second column to 2000 pixels, but it has no effect at all. I have DefColWidth set to 0 in the design time properties window.
As a follow up...
Hi everyone.... This is more of an Excell question, really, but I hope someone can help.
I am ready to populate the database for an application I have written. My HR dept have sent me the data they currently have in the form of an Excell spreadsheet. Each row of the spreadsheet has an employee...
Hello again, everyone. Can someone please tell me what I'm doing wrong again?
In my app, the user can put in part of the name of a training class to see records. If the database doesn't find a match, or only matches one class to the search criteria, fine, but if it matches more than one, I want...
Thanks guys. Yes, if I'd planned on a login from the git-go I'd have gone that way, but the app currently runs with no log-in, and security's been requested as a new feature.
Richard
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.