• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Adding data to sheet from userform using row and column references

Brendan Edwards

New Member
Hello everyone,

My name is Brendan and although I consider myself reasonably proficient in VBA and userforms (thanks Google)I still need help every now and then when google fails.

My issue is that I am trying to get data from a userform using a number on the form to lookup a reference in a column on the sheet and then also match a date on the form to a row on the sheet and then enter the value of the userform entry to the intersecting cell of those 2 references. I will add an example file and hope that makes sense.

Thanks in advance to anyone who accepts this challenge, knowing me it's probably very simple and I will look silly but it's only Thursday after all.
 

Attachments

  • UserForm Question.xlsm
    36.8 KB · Views: 6
Thank you for the reply but i'm sorry Narayan, i'm not quite sure what you mean but I have changed it slightly so I hope maybe now it make more sense.
I just want the value in the first "textbox2" under "Users ID" heading to be used as a row reference to match up with an entry in a column of the sheet then use the date at the top to match a date in the date row in the sheet and then put the value of "textbox11" in the intersecting cell in the sheet, this will be place in a change sub for "textbox11" so when the entry is made this will populate the sheet.
The userform provided is a very basic form just to try and aid an understanding of what I need.

Let me know if it still doesn't make sense and I will try again.
 

Attachments

  • UserForm Question.xlsm
    42.1 KB · Views: 4
Hi,

Your explanation was clear and I have no questions regarding the requirements.

The point I was trying to make is that the image (named Picture 2) , of the userform which you have pasted in your worksheet , has a listbox which is circled , and bears the date 05-03-2018.

The userform which you have created in the file , does not have this listbox.

Can you clarify this ?

Your code has a procedure named StartDate_Change ; to what does StartDate refer ?

Narayan
 
Okay, I think I got it now, StartDate is the box with 05/03/2018 in it in the picture, it is actually a DTPicker so when the userform is opened it should show today's date (although in the actual form it with be the Monday's date of the current week and will be a listbox) and the rest of the boxes across the top will show the dates for the rest of that week. These are the dates I want to use for the matching up of row 5 of the workbook.
The change part comes in when the user selects a different Monday from the drop down list it will update the rest of the dates in the top row of the userform.

If this is still not clear I might have to think about attaching the actual workbook but this will require some work to desensitize it as it contains a lot of names and numbers.

Just let me know and I will go from there.

Thanks Narayan.
 
Hi ,

OK. I will take it that StartDate is available at your end , and make the changes that are required.

Check back later.

Narayan
 
I was able to solve my issue by using Application.Match on the rows and columns for each TextBox, this works perfectly for my needs, thank you for any effort you have put into this problem.

Regards
Brendan.
 
Back
Top