macro beginner

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
460
Office Version
  1. 2019
hello all, i'm a beginner of macro
i want to create a form template to record guest inquiry, trying to write some code on textbox(es) to speed up my daily progress
however i get stuck with below issue, hopefully someone can help me out, superb thanks

the data will be saved into sheet2 sequentially from GUEST NAME......

1) i have ITEM UPC#(textbox15) & ITEM DESCRIPTION(textbox16), i want to return a product description at textbox16 when entering product code at textbox15. in addition, textbox16 will be blur(means no one can be modify unless administrator) when textbox15 product code entry is correct
ps: product details stored at sheet1
2) CLAIM CONTENT(textbox18) is guest inquiry story, how to easily lookup the story by searching some keywords either in columnB(CELL PHONE)/F(CASE#) when i click SEARCH button?
ps: the concept idea similar to ctrl+F
3) a button to lookup columnG(NEXT CALL DATE), reminds me with a list when the date is today which i have to call back my customer
ps: columnG is date format. the concept similar to outlook calendar

THANKS A LOT FOR THE GUIDANCE
kel

54ad3f8876
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi,
I take it that you have no code as yet for your Userform? What you want to do can be achieved but will involve some extensive code writing for the functionality you require.

If you are new to VBA & Userforms then can I suggest that you take a look here:https://www.contextures.com/xlUserForm01.html

This site gives good guidance in the subject and allows you to download a sample workbook for free.

Hopefully, this will help you get started.

Hope Helpful

Dave
 
Last edited:
Upvote 0
Hi,
I take it that you have no code as yet for your Userform? What you want to do can be achieved but will involve some extensive code writing for the functionality you require.

If you are new to VBA & Userforms then can I suggest that you take a look here:https://www.contextures.com/xlUserForm01.html

This site gives good guidance in the subject and allows you to download a sample workbook for free.

Hopefully, this will help you get started.

Hope Helpful

Dave
i have code on create, view, reset & close, but no better idea on edit
i run below code on another workbook previously, it need to search a keyword at textbox first, and then make change by clicking edit
but now i want it be more simply and directly, so search either in columnB(CELL PHONE)/F(CASE#)

'declare the variables
Dim rngFind As Range
Dim strFirstFind As String
'error statement
'On Error GoTo errHandler:
'clear the listbox
lstlookup.Clear
'look up parts or all of full mname
With Sheet2.Range("D:D")
Set rngFind = .Find(txtlookup.Text, LookIn:=xlValues, lookat:=xlPart)
'if value found then set a variable for the address
If Not rngFind Is Nothing Then
strFirstFind = rngFind.Address
'add the values to the listbox
Do
If rngFind.Row > 1 Then
lstlookup.AddItem rngFind.Value
lstlookup.List(lstlookup.ListCount - 1, 1) = rngFind.Offset(0, -1)
lstlookup.List(lstlookup.ListCount - 1, 2) = rngFind.Offset(0, 1)
lstlookup.List(lstlookup.ListCount - 1, 3) = rngFind.Offset(0, 2)
lstlookup.List(lstlookup.ListCount - 1, 4) = rngFind.Offset(0, 4)
lstlookup.List(lstlookup.ListCount - 1, 5) = rngFind.Offset(0, 5)
lstlookup.List(lstlookup.ListCount - 1, 6) = rngFind.Offset(0, 6)
lstlookup.List(lstlookup.ListCount - 1, 7) = rngFind.Offset(0, 7)
End If
'find the next address to add
Set rngFind = .FindNext(rngFind)
Loop While Not rngFind Is Nothing And rngFind.Address <> strFirstFind
End If
End With
'disable payroll editing
Me.reg4.Enabled = True
Me.cmdedit.Enabled = False
'error block
On Error GoTo 0
Exit Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top