VBA - Confused about Ranges

koutsos1

New Member
Joined
Apr 9, 2012
Messages
12
Hello,

Hopefully my problem is simple for all of you Excel Wizards out there. I have an Excel sheet with multiple worksheets. Each worksheet has it's own data and that data is related to each of the other data in the other worksheets. Anyway, I have a form that allows you to go to the main worksheet and select the row of data you want to compare with the some of the other data. In the row of data there are some cells that are not important. Here is what I have so far in terms of code:

HTML:
' Used for the "Exit" ButtonPrivate Sub exitbutton_Click()    Unload MeEnd Sub
' Used for the "Generate" Button
Private Sub Generate_Click()' Copies the selected reference dataDim reference As RangeSet reference = Range(Selection.Address)reference.Rows().Selecta = reference(Cells(1, 1))
 End Sub

I want to be able to selectively pick a cell from the highlighted row, generate a new worksheet and copy that cell on to the new worksheet.

Any help would be greatly appreciated, especially on how to selectively pick a cell from the highlighted row.

Thank you all in advance!
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Watch MrExcel Video

Forum statistics

Threads
1,123,307
Messages
5,600,869
Members
414,411
Latest member
Snowmanaus

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
Top