need some features in an excel form and some unexpected error to resolve

AparnaWangu

New Member
Joined
Aug 22, 2016
Messages
11
Hi Team,

I have created an onboarding form for employees and there is a worksheet where the data is getting stored.

The problem is now there is a runtime error coming in a listbox click function where all the records are displayed from the datasheet so in case of any modification user dont have to go to datasheet again and again.

I am attaching the file for reference with some dummy data.Please check that why that error comes.

Secondly I want the the headers to be displyed for all the columns in the list box which is not happening currently.

I am new to VBA so please please please help me.

Private Sub LB_00_Click()
For i = 0 To 4
Me("T_0" & i) = LB_00.Column(i) The error comes as runtime error and could not find the specified object
Next



Regards,
APS
 
You can’t use the list property if you are populating the list box with rowsource
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
While entering data in the Hire date column it is displayed in dd-mm-yyyy format but when I select a entry from the listbox it is displayed in number format. Can u help me out.

Regards,

Code:
[color=darkblue]Private[/color] [color=darkblue]Sub[/color] LB_00_Click()
[color=green]'For i = 0 To 4[/color]
[color=green]'    Me("T_0" & i) = LB_00.Column(i)[/color]
[color=green]'Next[/color]
[B]T_00 = LB_00.Column(0)[/B]
[B]T_01 = LB_00.Column(1)[/B]
[B]ComboBox1.Value = LB_00.Column(2)[/B]
[B]T_03 = LB_00.Column(3)[/B]
[B]T_04 = Format(LB_00.Column(4), "dd-mm-yyyy")[/B]
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

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