two questions about screenshots/exports

kemperohlmeyer

Board Regular
Joined
Oct 4, 2006
Messages
73
1) How do i tell vba to cycle through sheets in a workbook? Essentially i need a macro to run through each sheet, export as html (i know that part) and then go to the next sheet and repeat.

2) Each of the aforementioned sheets is very wide (about 80-150 columns). When i export i need the first five columns on the left and then some random (and changing) columns in the middle. It is easy to view with a simple pane freeze, but i don't know how to translate that into an exported view.

Thanks in advance.

ko
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

hatman

Well-known Member
Joined
Apr 8, 2005
Messages
2,664
1) like this:

Code:
Dim Item as WorkSheet

{code}

for Each Item in ThisWorkbook 'note, any workbook object will work here

  {code}

Next Item

2) Depending upon how you are performing the export, it may be sufficient to Hide the columns that you don't want displayed, perform the export, then unhide them when you are done...
 

Forum statistics

Threads
1,136,419
Messages
5,675,724
Members
419,584
Latest member
mrh8rr

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