royUK, you're right I do know that. I apologize for the mistake and offer no excuse but to say... My fault and thank you for bringing it to my attention. As always the code you offered works perfectly. Thank you again.
First let me say thank you for any help, Novice here. I have a userform with a textbox that is auto populated with a value which is made up from two numbers from two different columns on the worksheet. The first number is the date stored as Microsoft reference (ie today 10/13/2021, 44482), a "-", and sequence number (01). It is stored in column C on the worksheet in the following format, "44482-01". I need to find out if that value exists in column C of the worksheet. Below is my feeble attempt to try and find a match. I get the response "Did not find it" every time the code runs, even when the value does exist in the column.Code
What am I doing wrong?
OK thank you again for the help on this, I really appreciate it.
Let me re-phase my last question to clarify. If I comment out the "'Me.ComboBox1.DropDown" the list does not reactivate once the selection is made. I'm good with that, what I was pointing out is that before the fix was implemented (commenting out the 'Me.ComboBox1.DropDown) the list would DropDown and show matches with what was being entered by the user, as the user was typing. After the fix you have to use the mouse to click on the list before seeing anything in the DropDownList. If that makes any sense??? At the same time I'm good with that if there is no fix for it. Thank you.
royUK, Thank you that does stop the re-activation on the DropDownList. However I noticed the when I type the name of the customer the DropDownList does not show matches of what is typed. Is there anyway to correct that? If not its not a big deal the user can type a few letters and then click on the arrow and get the same result. Also, Thank you for the correction on the SaveAs, I will make those changes. I really do appreciate the help on this. tjamestx
Sorry about that, not sure what went wrong. THe original file is an .xltm but can not upload that file extension so I saved it as an .xlsm. It opened up for me on my end please let me know if this file does the same, Also, I appreciate you taking a look.
I have a searchable ComboBox (original VBA came from https://trumpexcel.com/excel-d…-with-search-suggestions/) for the customer name. The problem I'm having is, after the ComboBox is filled. The ComboBox continues to reactivate anytime change is made to any other cell on the worksheet and also seems to stay active when the workbook is closed.
I have attached a copy of the worksheet and unprotected it so everything is visible.
Any help on this would be greatly appreciated.
Alan, thank you for informing me of the mistake in posting and for correcting it for me.
sktneer, thank you for fixing my issue with the VBA, its works exactly as I wanted.
I have a template workbook that has a drop down list for the user to choose a Customer Name. I then have a function [=IFERROR(VLOOKUP(J13,Customer Data!A2:C202,3,FALSE),"")] looks at cell J13 and returns the Customers Street Address on an exact match. I have the validation error turned off so the user can type in a name that may not be in the drop down list.
My questions is because the function will wipes itself out if the user enters a name not in the list. I'd like to be able to re-insert the function when the template is closed so the next time it opens the function is there.
The Private Sub Workbook_BeforeClose(Cancel As Boolean) looks like this:Code
- Private Sub Workbook_BeforeClose(Cancel As Boolean)
- If Date = Range("O4").Value Then
- Range("O4").Copy Range("P4")
- End If
- Range("J14").Formula = "=IFERROR(VLOOKUP(J13,Sheet2!A2:C202,3,FALSE),"")"
- Application.DisplayAlerts = False
- With Application
- .WindowState = xlMaximized
- End With
- Range("O7").Value = "run"
- ActiveWorkbook.SaveAs ("\\server1\share\QuickBooks Common\Templates\BOL_New.xltm"), FileFormat:=53
- End Sub
I hope I've posted this correctly, so if not I apologize in advance.
Stops running after "Sheets("CUTTING").Select". Any help would be appreciated.Code
- Private Sub Sav_Click()
- Dim Path As String
- Dim FileName As String
- Path = "C:\Users\TOM\Documents\Company Files\RSC\Orders\"
- FileName = Range("C3")
- ActiveWorkbook.SaveAs FileName:=Path & FileName & ".xlsx", FileFormat:=51
- End Sub