I'm writing a lot of code to go through a LARGE customer file and replace an existing customer number with a new number (I've pasted a snippet below). What I don't know how to do is have it continue going if that number is not found. I don't want it to drop out of the routine, just go to the...
Help please:
I'm using the following code to open a query and based on the value in the field 'Status' display a particular form. THe value in status will change as the process is completed. I need to be able to read the value and if it's 2, I'll open a different file. There's something wrong...
I have a form in Access2000. When a button is pushed for action, I want to check that all fields have been filled in. I'm trying within the event code of the button to write this code:
If RptDate.Value = Null Then
MsgBox "There must be an entry for Report Date."
Exit Sub
End If
If...
I'm sure this question has been asked, but I couldn't find it. I want to limit my database to only one user at a time. When someone is in making changes, it won't allow another user to enter until they are finished. Can I do this? and how?
Thanks in advance,
MrsTFB in Tennessee
I have an Access (2000) database that has a query ran from a form. I want the value that the query asks for (Part Number) to be whatever value is in PartNumber field on the form. I don't want the user to have to enter the part number for the query to run.
I know it's possible, just don't know...
I have found this explanation, but don't exactly understand it.
Password Optional Variant. A string that contains the password required to open a protected workbook. If this argument is omitted and the workbook requires a password, the user is prompted for the password.
MrsTFB
I have the code below:
Workbooks.Open Filename:="F:\charts\HR-EPA WORKBOOK.xls"
It is a password protected file, but I want the code to operate without the need for the password. It is going to open, write to it, then close it all within the code. It prompts for password still.
I know...
I fixed it another way. In the code, right after the SaveAs ("anothername") I set range ("az243") to equal 1. Then in the AutoOpen code, I put the if statement that if that range = 1, then exit sub.
It's not pretty, but it works.
Thanks for your input.
MrsTFB in Tennessee
It's housed in ThisWorkbook object and this is the exact code. It's not actually in a Module per se. When I moved it into a module, the event did not occur.
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("DCNTemp").Select
Range("AZ2").Select...
Nope, same "Object Required". All I really care about is that the SignIn form is removed from the module. If it incremented the number and saved the workbook wouldn't matter. Just don't load and display the form. Would that be easier?
MrsTFB
Nope, I thought that would work, but it wants an object required. I'm betting that I have to give it a more direct address of the module, since I'm deleting it from a form and the module is in the Workbook properties. I'm not very proficient at VBA, just a rookie.
Thanks for any help!
MrsTFB
This is found in the This Workbook section of the project, and it is a Workbook_Open sub. I just want to delete it after the workbook has been saved as a new name, which occurs in the SIgnIn form that the sub initiates.
SOrry to be so unclear. I will try this code after the file has been...
I have an open event in an Excel workbook that after Saving the workbook as a new name, I want to disable the sub. The disable would occur with a click event on a button on the SignIN Form. Is this possible?
Here's the code:
Private Sub Workbook_Open()
Application.ScreenUpdating = False...
I'm going to use the dummy row. THat will always start my formula at c3 and the last row that does increment will be fine. I thought there would be a formula or something for this.
Thanks for all your help. As long as I get the results I want, I'm happy.
MrsTFB in Tennessee
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.