View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika Dick Kusleika is offline
external usenet poster
 
Posts: 179
Default VBA to save range as a HTML fife

Brian

If you are using a command button from the Control Toolbox, see if changing
the TakeFocusOnClick property makes a difference.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Brian Lahti" wrote in message
...
Thanks for the reply!

I found that I have to have my code in the command button
select a cell on the spreadsheet for the "PublishObjects"
methods to work. Something like Range(a6).select ...

It took awhile to figure out but the code would run from a
macro but not from a VBE sub w/o the "Range(a6).Select".

Thanks

Brian


-----Original Message-----
Brian

See the Add method of the PublishObjects collection. Use

the PublishObjects
property of the Workbook object, such as

ThisWorkbook.PublishObjects.Add etc..

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Brian Lahti" wrote in message
...
It is a simple matter to manually save any part of a
spreadsheet at a .htm file. When I macro record the
process the code doesn't work in a command button.
Does anyone know of a VBA code to perform this?

Thanks

Brian



.