please help with vba coding

tango71

New Member
Joined
Aug 27, 2019
Messages
12
Ok, so what i am trying to do is to use a vb form to view ranges on a worksheet. i dont want to change anythin but i do want to scroll through to the last row that has data. that being said, i have literally tried everything i can think of short of just writing a java script and doing what i need through there. i am an amateur at vba but do understand how coding works.
some of the things i have tried are
Code:
Worksheets("Register").Range("A1:G22000").PrintPreview
i have tried linking data to a label.
linking to a list box, a text box, you name it ive tried it. just cant get it to display anything.
I know it is probably something stupid simple that im just missing. ive been working on this for about 3 hours
i guess im just not getting it. Please help.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
@Fluff, i just tried your code again and placed it in Activate insted of initialize and it workd! Thank you both so much for the help!
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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