Hi All,
I can't understand how to Add/Update the data (as per attached image) in "ShiftTemplate" sheet based on last 6 digits of employee id (txtEmployeeID). I have tried to do it but it is not working . please help me
Hi All,
I can't understand how to Add/Update the data (as per attached image) in "ShiftTemplate" sheet based on last 6 digits of employee id (txtEmployeeID). I have tried to do it but it is not working . please help me
What part are you having a problem with; matching the ID?
This will find the employee ID in column A
It's the same method you used in the cboEmpl_change procedure.Please Login or Register to view this content.
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
when I run this code i am getting error. Please help me to resolve this error.
Also i need one more help.
1. i want to update the numeric value of the month (selected in combo box) in excel sheet.
Can any one help me?
.Cells(x, 2).Value = Me.cbomonth.ListIndex + 1
.Cells(x, 3).Value = Val(Me.cboyear.Value)
Hi AlphaFrog,
i am using your said code but getting an error. Please check the code (in the attached list) and let me know where i am doing mistake.
It worked for me using your latest workbook.
What is the error description and what line of code is highlighted?
Please find attached the error images
The only way I can get that error is if there is no employee selected.
i can't understand how to resolve it.
What employee did you select?
Hi AlphaFrog,
I have changed the code and resolved the issue.
Please Login or Register to view this content.
Last edited by Sanjibghosh; 11-07-2016 at 04:29 AM.
Hi AlphaFrog,
i need one more help. how to add 0 before the month (exmaple- 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11,12).
Last edited by Sanjibghosh; 11-07-2016 at 04:32 AM.
You need to format Column B as Text otherwise zero will be automatically deleted. Then when you write value to Sheet use the Format command to properly write the month number.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
Actually i am using userform and when i click the add button, the month value will be save like (01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11,12) format in column B
Again, format column B as Text then use.
Please Login or Register to view this content.
Or just leave the code the same and format column B as Custom "00"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks