Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA to save range as a HTML fife

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
save as html unhide all columns[_2_] Excel Discussion (Misc queries) 0 April 26th 10 02:19 AM
Save Workbook as HTML sjwopg Excel Discussion (Misc queries) 0 January 6th 10 08:25 PM
Save as HTML oddity c Excel Worksheet Functions 2 August 5th 05 02:55 AM
cells not right when save as html Scott Excel Discussion (Misc queries) 0 February 23rd 05 01:59 PM
save as html writenick Excel Discussion (Misc queries) 0 January 13th 05 05:25 PM


All times are GMT +1. The time now is 08:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"