VBA - Vlookup to active row in textbox79.

learning1984

New Member
Joined
Mar 2, 2016
Messages
14
Morning guys,
I have a spreadsheet whereby the user completes user forms which populate a log, this all works fine. the user selects the date on the userform from a date picker calendar, what I want to happen is, the date gets imported to next available row column c. id like active row column d and e to contain a period ref and a week ref.

as well as working in dates, we also work in periods, 13 periods in a year, each one having 4 weeks, example, 17/03/2017 = period 7 week 1
in a separate sheet I have a list of all dates, and the corresponding period and week in the aligning columns,
if I was to put a vlookup in column d, it would look like this; =VLOOKUP(D(activerow),Data!BU2:BW510,2,FALSE)

I just cant seem to get this working in my vba. currently the date picker calander works, and places the date in datebox78, I then have TextBox79.value = ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Data!R2C73:R510C75,2,FALSE)" but this isn't working :(
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,514
Messages
6,125,263
Members
449,219
Latest member
daynle

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