My queries are not showing any records that contain one or more blank fields.
I have a table (named DrugInfo) with 35 fields. I want to find records based upon user input for up to five of these fields. These fields are: drug, rph, requester, question summary, question response.
I created a...
When the user is in print preview and then selects "close" from the print preview menu bar I woul like Excel to not only go to sheet1 (which it does) but to also set cells F4 and F14 on sheet1 to a value of zero. I haven't been able to find out how to trigger the running of code when the user...
Sometimes my networked Excel application generates an Error #55:
"Samplefile.xls is already open. Reopening will cause any changes to be discarded. Do you want to re-open?"
The app runs fine regardless if I answer yes or no to this question.
I would like to write some visual basic code to...
I'm trying to require that the user imput a value into cells B3, B4, and B5. I have the following code to run "on open". The problem is this code allows the user to click on OK in each dialogue box then continue without entering any data into cells B3,B4, or B5. How can I require that data be...
I am trying to write a series of IF then statements in VB for Excel. I have tried to use the:
IF [condition] Then
Statement
Else
End If
format without any success. I have three cells (F4, F10, and F14). Each of these cell values are controlled by radio buttons. F4 can have a value...
I have an Excel file that is networked as a read-only application. The users utilize the worksheet to perform some calculations, then on close the workbook is coded not to save any changes. However, I would like to have a counterthat tells me how many times this Excel app is opened. It would...
I would like to either: 1) Close the print preview screen from a VB code module or 2) Print the worksheet from the print preview screen using VB. I have tried the suggestions given to be17 (thread 707-104728) without any success. I have also tried using the sendkeys command to send a "c" or...
I have a workbook in which all of the macros are password protected by the following line of code:
If Sheet1.TextBox1.Text <> "passsword" Then Exit Sub
I would like to be able to run a macro that is still password protected using the above code with a hot key/short cut key even if the...
I would like to password protect some, not all, of my macros and code modules. I have already protected my VB code from being changed by setting the "VBA-Project- Project properties" and then selected the protection tab, lock project for viewing and added a password. I want to prevent a user...
I have a command button on sheet2 that runs a macro on sheet2. I would like to copy the command button to sheet1 so that the user does not have to ever look at sheet2. I've tried copy,paste special and I've tried to add a macro that first goes to sheet2 before executing the command button...
Help please. I'm new to VB. I'm using Excel 2002. I need to write a macro that will run by the user clicking on a command button on sheet2. I have ~20 different items that can be selected in cell b3 (by a drop list)on sheet one. I would like to have the macro select the named range that is...
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.