Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Back Door to VBA?

Having "grown" a workbook over several years adding
little bits of code here and there I've made a mistake in
the code somewhere and excel closes as soon as I open the
workbook.

Is there a back door into the workbook just to look at
and alter the code?
There is no protection on the workbook or the code.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Back Door to VBA?

Open it with macros disabled.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Wayne" wrote in message
...
Having "grown" a workbook over several years adding
little bits of code here and there I've made a mistake in
the code somewhere and excel closes as soon as I open the
workbook.

Is there a back door into the workbook just to look at
and alter the code?
There is no protection on the workbook or the code.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Back Door to VBA?

Wayne,

Hold down the SHIFT key when you open the workbook. This prevents
the startup code from executing.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Wayne" wrote in message
...
Having "grown" a workbook over several years adding
little bits of code here and there I've made a mistake in
the code somewhere and excel closes as soon as I open the
workbook.

Is there a back door into the workbook just to look at
and alter the code?
There is no protection on the workbook or the code.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Back Door to VBA?

I would visit the following sites to deal with backing up your
workbook(s).

David McRitchie
http://www.mvps.org/dmcritchie/excel/backup.htm

AutoSafe.zip
http://www.bmsltd.co.uk/mvp/MVPPage....nKarelPieterse

-------------------------------------------------------------------------------------------

After you've opened the workbook using the suggestions provided, you
may want to try to adapt the following code to 'backup' your code.
Watch the linewrap.

Sub ExportAllVBA(Optional varName As Variant)
'' Exports all Modules, etc. to folder named the same as the Workbook.

Dim VBComp As VBIDE.VBComponent
Dim PartPath As String
Dim NextPartPath As String
Dim TotalPath As String
Dim Sfx As String
Dim d As Integer

If IsMissing(varName) Then varName = ActiveWorkbook.Name Else
varName = CStr(varName)

PartPath = "C:\Money Files\Computer Helpers\Modules\"
NextPartPath = Left$(ActiveWorkbook.Name, Len(ActiveWorkbook.Name)
- 4)

On Error Resume Next
TotalPath = PartPath & NextPartPath
ChDir TotalPath
If Err.Number = 76 Then MkDir TotalPath
On Error GoTo errHandler

For Each VBComp In ActiveWorkbook.VBProject.VBComponents
Select Case VBComp.Type
Case vbext_ct_ClassModule, vbext_ct_Document
Sfx = ".cls"
Case vbext_ct_MSForm
Sfx = ".frm"
Case vbext_ct_StdModule
Sfx = ".bas"
Case Else
Sfx = ""
End Select
If Sfx < "" Then
VBComp.Export _
Filename:=PartPath & NextPartPath & "\" & VBComp.Name &
Sfx
End If
Next VBComp

Exit Sub

errHandler:

MsgBox "The reason for this message:" & vbCrLf & "The Error Number
is: " & Err.Number _
& vbCrLf & "The Error Description is: " & Err.Description

End Sub


HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

Having "grown" a workbook over several years adding
little bits of code here and there I've made a mistake in
the code somewhere and excel closes as soon as I open the
workbook.

Is there a back door into the workbook just to look at
and alter the code?
There is no protection on the workbook or the code.


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
Lockout Services Los Angeles Locked Out Open Door Locksmith1-323-678-2704 emil cohen Excel Worksheet Functions 0 September 1st 09 07:35 PM
back ups barry Excel Discussion (Misc queries) 2 February 1st 09 07:36 PM
copy back macro/roll back moh Excel Worksheet Functions 4 March 5th 07 02:19 PM
I hid row 1 and can't get it back? Nyczoo Excel Discussion (Misc queries) 4 January 24th 06 07:22 PM
Jon - come back Wazooli Charts and Charting in Excel 0 March 24th 05 04:49 PM


All times are GMT +1. The time now is 10:12 PM.

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"