Form Entry

MrHuge

Board Regular
Joined
Jun 23, 2005
Messages
219
Hi i have a question regarding Form Entry.
I have a form with a whole lot of data in it that pastes itself into the appropriate columns on a submit.
At the Moment i use
Code:
        Cells(ActiveCell.Row, 4) = LocationCB
Is there a way i can reference this to a column header, or a defined name column?
This causes issues if someone inserts a column into the spreadsheet, the data ends up in the wrong column.

Cheers
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
There are a couple of ways. Need to find which column the header is in at the time, so something like :-
Code:
LocationColumn = Application.WorksheetFunction.Match("Location", "A1:Z1")
Cells(ActiveCell.Row, LocationColumn) = LocationCB
 
Upvote 0

Forum statistics

Threads
1,207,169
Messages
6,076,908
Members
446,239
Latest member
Home Nest

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