LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sheet export removes custom toolbars.


Hi Guys,

I have a workbook that, when opened, removes all the defult toolbars
and creates a custom bar on wich I have a button to export the current
select sheet to a location.

the problem is that when this code is run is replaces my custom toolbar
with the defult ones.


any ideas?

thanks
kevin


Sub export()
Application.DisplayAlerts = False
Dim newWks As Worksheet
Dim strdate As String
strdate = Format(Now, "dd-mm-yy")
Sheets("summary").Copy
Set newWks = ActiveSheet
With newWks
..Buttons.Delete
With .UsedRange
..value = .value
End With
..Parent.SaveAs Filename:=ThisWorkbook.Path & "\ " & Range("b2").value &
" " & strdate & ".xls", FileFormat:=xlWorkbookNormal
..Parent.Close savechanges:=False
End With
MsgBox "File successfully exported to " & ThisWorkbook.Path
Application.DisplayAlerts = True
End Sub


--
jinx_uk_98
------------------------------------------------------------------------
jinx_uk_98's Profile: http://www.excelforum.com/member.php...o&userid=28878
View this thread: http://www.excelforum.com/showthread...hreadid=509932

 
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
Custom Toolbars Tami Excel Worksheet Functions 1 August 7th 09 04:14 AM
'Reset to Match Style' removes all formatting from custom chart Simon Reid Charts and Charting in Excel 0 November 13th 08 05:49 PM
Protect Sheet: clicking in cells removes all previous text Kristin Excel Discussion (Misc queries) 1 October 25th 06 10:18 PM
Protect Sheet: clicking in cells removes all previous text Kristin Excel Discussion (Misc queries) 3 September 5th 06 07:30 PM
Can you Import & Export toolbars...? Andrew Excel Programming 2 June 12th 05 08:39 PM


All times are GMT +1. The time now is 05:34 AM.

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

About Us

"It's about Microsoft Excel"