File/Send to change ??
How can I add my floppy A drive to the send to option for an excell
worksheet. Xp professional ver Microdoft excel 2000 V 9.0.2720 Thanks for the help |
You really don't want to have this option. Saving a file directly from Excel to
a floppy is asking for file corruption and data destruction. Just save the file to your desktop then move/copy it from there. "Bruce" <Bmanalio(remove wrote in message ... : How can I add my floppy A drive to the send to option for an excell : worksheet. Xp professional ver Microdoft excel 2000 V 9.0.2720 : : Thanks for the help : : |
Hi Bruce,
If you really, really want to do this, it definitely can be done. Here are some instructions below. I do take the liberty of having a few assumptions. These assumptions are ... 1) You want this added every time you open Excel 2) You want to retain the ability to delete this if desired 3) You already have a Personal.xls file created (if not, post back and we'll fix ya up) 4) It will not affect if no workbook is open, and 5) It will give you an error message if no disk is inserted in drive A If these are alright, follow these instructions ... 1) Hit Alt + F11, to enter the Visual Basic Editor (VBE) 2) Hit Ctrl + R, to open the Project Explorer (PE; if not already open) 3) Select your Personal.xls file/project in the PE (filename is bolded) 4) Select Insert (menu) | Module 5) Copy/paste the code below to the right (blank) pane (aka Code Pane) 6) Hit Alt + Q, to return to Excel 7) Save changes before anything else is done. Code to copy/paste: Option Explicit Const STNAME As String = " Floppy (A:)" Sub AddSendToFloppy() Dim cbPo As CommandBarPopup Dim cbFl As CommandBarButton Dim strText As String Call DeleteSendToFloppy Set cbPo = Application.CommandBars("File").Controls("Send To") Set cbFl = cbPo.CommandBar.Controls.Add(msoControlButton, 1) strText = "3" & Chr(189) & STNAME With cbFl .Caption = strText .DescriptionText = strText .FaceId = 3 .OnAction = "SendToFloppy" .Tag = strText .TooltipText = strText End With End Sub Sub DeleteSendToFloppy() On Error Resume Next Dim cbPo As CommandBarPopup Set cbPo = Application.CommandBars("File").Controls("Send To") cbPo.CommandBar.Controls("3" & Chr(189) & STNAME).Delete End Sub Sub SendToFloppy() Dim strDrive As String, strPath As String If ActiveWorkbook Is Nothing Then Exit Sub strPath = ActiveWorkbook.Path strDrive = Left(strPath, 3) On Error GoTo errHandler ActiveWorkbook.SaveAs "A:\" changeDirectory: ChDrive strDrive ChDir strPath Exit Sub errHandler: MsgBox "There was an error. Please ensure a disc is inserted in drive A:" Resume changeDirectory End Sub To use add to your Send To menu, just press Alt + F8, select 'AddSendToFloppy', click Ok. Now, to get it to open everytime Excel opens, you'll need to add another routine to your Personal.xls file. First (from within the VBE), expand all folders of your Personal.xls project in the PE (left pane). You should see a ThisWorkbook module, double click it. You'll get a blank pane on the right (as long as nothing has been programmed there before, which I'm assuming). If you have something there, we'll need to adapt; but assuming you have nothing, copy/paste the following code in there ... Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) Call DeleteSendToFloppy End Sub Private Sub Workbook_Open() Call AddSendToFloppy End Sub Before doing anything else, go to File | Save, then hit Alt + Q. Now you will always have it. Post back with any questions (I know that was a lot). HTH -- Regards, Zack Barresse, aka firefytr, (GT = TFS FF Zack) "Bruce" <Bmanalio(remove wrote in message ... How can I add my floppy A drive to the send to option for an excell worksheet. Xp professional ver Microdoft excel 2000 V 9.0.2720 Thanks for the help |
All times are GMT +1. The time now is 02:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com