Cannot Save While Debugging Error

Aug 16, 2014

I got an error message that I cannot save while debugging. But I have repeatedly hit the stop icon to stop debugging!

I have minimized all the windows (except the spreadsheet as it does not allow me select it and just beeps) to make sure there are no hidden message boxes.

I do not want to force exit and lose my work but I cannot get out of debug mode for some reason!

View 6 Replies


ADVERTISEMENT

Debugging RefEdit Compile Error

Jul 9, 2009

I sent the attached to a user who said it wouldn't run when the 'Draw Venn' button is click - some sort of RefEdit compile error. I can't replicate the error and can't find what's causing the error.

I had started using RefEdit control but couldn't get it to work the way I wanted, so just went with input boxes. I run this on XL07 SP2, other user has XL03 - not sure if that's relevant to the error they're getting.

View 4 Replies View Related

Debugging The Type 13 Mismatch Error Quickly

Apr 29, 2009

What is the quickest/best way to find out exactly what is causing a Type 13 Mismatch error?

Debugging with F8 is taking forever as I have to go through loops that go through 6000+ rows each...

View 10 Replies View Related

Debugging Error: Object Variable Blocked Variable Not Set

Nov 9, 2009

I am getting an error at this line:

Set rng5 = Range(.Cells(celle2.Row, celle4.Column), .Cells(celle2.Row, celle4.Column))

Sub UpdateNumbers()
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Dim rng4 As Range
Dim celle1 As Range
Dim celle2 As Range
Dim celle3 As Range
Dim celle4 As Range
Dim celle5 As Range
Dim flag1 As Long
Dim flag2 As Long................

View 9 Replies View Related

VBA (Save As) No Error But File Does Not Save

Oct 10, 2011

I have written the following simple macro to import some data into a worksheet and then prompt the user to save the file in Excel 2003 format (the system to which we will upload this data does not accept formats later than 2003). The template is in "*.xlsm" format.

The code executes without error, but when the user hits the "Save" button in the "Save As" dialog box, nothing happens. The "Save As" box closes, but no file is saved.

Code:
Private Sub cmdImportData_Click()
Dim sFName As String
'On Error Resume Next
PrepData
CopyData
FormatColumns
'prompt the user to save the file in "*.xls" format
sFName = Application.GetSaveAsFilename("upload", "Excel files (*.xls), *.xls")
End Sub

View 3 Replies View Related

UDF- Debugging

Nov 2, 2007

I'm using this as a formula =ReturnClient(A1) for example. I put the msgbox in there just to get some feedback on what was going on in there, and it does correcty show the first two digits of the cell it's referencing, but the select case is not ever hit.

Function ReturnClient(refNumCell As Range) As String

Dim cell As Range
Dim clientInit As String
Dim first2Dig As String

For Each cell In refNumCell.Cells

first2Dig = Mid(cell.Value, 1, 2)
MsgBox (first2Dig)

View 9 Replies View Related

Debugging Qtn -

Jul 9, 2008

= OFFSET(AutoMatrix!$B$1,MATCH(C3,TEST),MATCH(H1,AutoMatrix!C1:Z1,0))," ")

Can anyone seem to find any fault on this statement?

When i try to SHIFT,CTRL & ENTER - it's complaining about semi cols. on the extreme right

TEST - is a Name definition
AUTOMATRIX - is Worksheet name

View 9 Replies View Related

Debugging A Nested Function

Oct 2, 2009

I am receiving an error using the following string as I am not using the OR request properly.

=IF((+$B7&$C7&$D7&$E7)="","",IF(+D7="",+I6,+D7) OR IF(+D7="(blank)","",+D7))

View 2 Replies View Related

Sort Code Only Executes When Debugging

Nov 15, 2006

Within the code I am asking excel to sort two difference worksheets with virtually the same code, except that one of the worksheets does not get sorted. If I step through the code, it works and the worksheet is sorted, but if I just run the macro the worksheet does not get sorted, as if the line of code in question is being skipped. Pointedly, my question is - Why does the code work while debugging (stepping through) but not when I generally run it?

Also, as far as the code is concerned, I am sure that the all variables contain the information I need them to and am also sure that any ranges created from those variables are also the ranges they should be. Here are the two lines of code that are supposed to sort. The UBOC cash sheet gets sorted, but the LNB cash sheet does not.

'Sort the UBOC cash sheet.
wsUBOC.Range("A5:G" & lUBOCRow).Sort Key1:=Range("A6"), Order1:=xlAscending, Key2:=Range("D6"), _
Order2:=xlAscending, Key3:=Range("G6"), Order3:=xlAscending, Header:=xlGuess, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom

'Sort the LNB cash sheet
wsLNB.Range("A1:G" & lLNBRow).Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("C2"), _ .............

View 2 Replies View Related

Suspend User Defined Function While Debugging

Nov 12, 2006

I am presently trying to debug a large and repetitive piece of code and find that I keep ending up in a function within the same module. I assume this is because the function is being triggered as I manipulate data. If this is the case, does anyone know how to suspend the function while I debug? I guess I could comment it out as I do not need the data it is returning but during normal running, this is not possible and I expect if it is fired off then it will slow things down considerably if my code keeps getting interrupted by interreupts from the function.

View 2 Replies View Related

Error 1004 While Save As

Dec 7, 2009

I'm trying to create a macro that will take a worksheet from an Excel workbook, and save it as a text file, with the name determined from user input, and the location being the desktop of the currnet user's computer.

First I use a function, (provided by RoyUK), to get the name of the current desktop, then I try to use that name, along with my user input, so save the file. Obviously, it's not working, or I wouldn't be here. I get a "Run-time error '1004': The file could nto be accessed". I think it's just a syntax issue with the file name, because debug takes me to the "SaveAs" portion of the macro.

View 2 Replies View Related

Save As- Getting Run Time Error 91

Jan 12, 2010

I have got the code below, I am trying to save as file name with it ending with upload, however I am getting run time error 91,

'Worksheet save as upload name
Dim Wk As Workbook
ActiveWorkbook.SaveAs Filename:=FileDrive & Wk.Name & "Uploads" & ".xls", _
FileFormat:=xlNormal

View 9 Replies View Related

Before Save Event Error

Sep 21, 2006

Here is my existing code...

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application. ScreenUpdating=False
' Cancel user prompted save procedure
Cancel = True
' Code removed... changes some values and settings before saving
ThisWorkbook.Save
' Code removed... return the original values and settings
Application.ScreenUpdating=True
End Sub

For some reason, the workbook is not being saved when the above code is executed. It seems the problem lies with "ThisWorkbook.Save"... in that it just isn't saving! If I delete "Cancel=True", the workbook will save (obviously!).

I have spent an hour trying to work this out and have come to the conclusion that it is something other than my code... has anyone experienced this problem before?

View 9 Replies View Related

Worksheet Before Save - Getting Debug Error?

Feb 12, 2014

I am trying to take the template I have created and after the information is entered, if all required is not filled in, it will highlight the cells that need filled in. I get a debug error on

VB:
Cell.Interior.ColorIndex = 6

And the file does not save elsewhere. It goes into never never land. Here is my whole code:

VB:
Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Start As Boolean

[Code]....

View 5 Replies View Related

Copy Sheet - Save As - 400 Error

Jun 13, 2008

When I use this code in the workbook I want it gets as far as creating a new workbook and pasting the data, but then an error comes up saying nothing but "400", and does not complete the saving part.

Private Sub Workbook_Open()
Sheets("Open").Activate
End Sub
Sub SaveASheet()
Dim fName As String
Dim myPath As String
Dim sht As Worksheet
myPath = "K:3. DesignSupply OrdersLog"
For Each sht In ThisWorkbook.Worksheets
If sht.Range("D1").Value "" Then
sht.Copy
With ActiveWorkbook
.SaveAs myPath & ActiveSheet.Range("G11").Value & ".xlsx"
.Close
End With
End If
Next sht...................

View 9 Replies View Related

Error Handling (Close Without Save)

May 12, 2009

I've got some code that reformats a file that a supplier sends us. They seem to randomly change the structure, so I'm trying to make the code a bit more robust.

Part of the code uses MATCH to look for specific column headings, so I've got some error handling around this of the format:

On Error GoTo NoIncCol
Line using MATCH
On Error GoTo Exiting
where Exiting is my standard error handling (Close without Save) and NoIncCol is the same, but with an error message saying that the term the code was trying to MATCH can't be found. This works well for me.

In another part of the code, I need to check for another column heading, which so far has turned up in two different forms. At the moment I'm doing this as follows:

With Sheets("Sheet1").Range("1:1")
Set rFound = .Find("Term1")
If Not rFound Is Nothing Then
a = "Term1"
Else

This feels a bit clunky, and I don't really like having what is essentially error-handling in the middle of my code. But the only other way I can think of to do it is to use a GoTo, and I believe that's not really considered good practice either.

View 9 Replies View Related

Save As Error Handling Through Input Box

Mar 1, 2007

I need to:Turn off "save" and "save as" command barsPrompt user for a unique filename Save file to a specific directory on the network common to all "p:dataprc"Requery user if filename exists and if they DON'T want to overwrite.Return to worksheet (there is only one) if the user cancels from the message box.Turn commandbars back on The macro runs from an on screen button
I get bug errors on NO or CANCEL when clicked in the message box. This is my current

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save As...").Enabled = False
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save").Enabled = False
End Sub

Sub SaveMe()
'
' Keyboard Shortcut: Ctrl+z
'
Dim BaseDir As String
Dim NewName As String
BaseDir = "p:dataprc" ...........

View 7 Replies View Related

Save Macro Validation: If Error Got To Cell A1?

Apr 18, 2009

I have a command button that runs a save macro to which I added cell validation the message box comes up and what I want it to do is go to the cell that is blank

View 2 Replies View Related

Save Export Specific Worksheet Error

Jan 23, 2010

I am trying to run a macro that will export the 'Results' WS & ask the user where he/she wants the .xls to be saved, though when I click 'Save' nothing happens.

In additons in the save as part it has the WB's name(and full extention) is there a way to make this blank or to have something in it? I.e the WS's name?

View 10 Replies View Related

Runtime Error 1004 - Unable To Save File

Mar 30, 2014

I am executing code in a workbook that has been working successfully previously.

Suddenly I get a run time 1004 error in any macro in the workbook that tries to execute a activeworkbook.save command?

View 1 Replies View Related

Save Workbook To A Specific Location - 1004 Error?

Jul 21, 2013

Im struggling to get a workbook to a specific location. I have copied 3 worksheets to a new workbook, which im trying to save to an archive folder. Here is my code.

Code:
Sub atest()
Dim strFileName As String
Dim Archivepath As String

[Code]....

The problem is i keep getting an error (runtime 1004) saying the file could not be found?? well, im trying to create it !..

View 2 Replies View Related

Too Much Formatting - Save Error "Could Not Save All The Data And Formatting"

Jun 5, 2008

Does anyone have a workaround for the following error "Excel Could Not Save All the Data and Formatting" Error Message (http://support.microsoft.com/kb/215783). I am applying validation to many, many cells

View 4 Replies View Related

Excel 2010 :: Save Open Worksheet To File And Include Date Of Save?

Mar 11, 2014

am using Excel 2010 and having issues trying to save a worksheet to a specified file location with the save date....

I have tried several posts form this forum and elsewhere and can't seem to get the macro to do what I want.....

I want to save a 'worksheet' from an open workbook that I use for updating information to the same file path as the workbook with the date the file saved...

View 6 Replies View Related

Excel 2003 :: Unable To Allow Users To Make Changes To Workbook But Only Be Able To Do Save As Not Save

Dec 3, 2012

I have an expense report, which was originally done in Excel 2003. It still prompts users to open as read only however if they select no, they are not prompted for the password, and it has allowed them to save, so when the next person opens it, they have the previous person's report instead of the clean workbook. I have tried everything to put a password onto it. I know this is really basic stuff, but maybe I am missing a step? I want the end user to be able to make all the changes they want in read only mode and then do a save as, but if the select No when prompted "Open as Read-only?" they should have to put a password in.

View 4 Replies View Related

Excel Save As Should Default File Save Type To XLSX Using VBA

Aug 21, 2012

What I am trying to do is that I have an excel file with macros and it is a read-only file. In order for the user to save, I want them to only be able to save as a .xlsx file as it disables all macros. If for whatever reason, the user wants to save the file as another .xlsm file, they should be allowed but before they save, a "are you sure you want to save as .xlsm?" message should pop up.

All the options in the save as box should still be available in case they want to save in that particular format. Just that the .xlsx should be the default.

View 2 Replies View Related

Macro To Check If Saved Then Save Else Bring Up Save As Dialog

Sep 6, 2012

I'm trying to make a macro check if a file has been saved (ever). If so I want the macro to do a regular save (with already esatablished filename and location) before it proceeds with the rest of the macro. If the file hasnt been saved (if it runs from a new workbook) then I want it to pop up the save.as dialog, so that the user can choose the name and location of the file before the macro continues .

The macro itself is saved in personal.xlsx.

View 1 Replies View Related

Customize Look In/Save In (My Places) In Open/Save As Dialog Boxes

May 10, 2008

I would like to add some icons on the left side of excel open file pane to faciliate my work. Because i need to load some files under the same folder many times a day. Does anybody know how to do that? I've seen people has more icons on the pane before. The defaut setting has only 'History', 'My Documents', 'Favorites', 'Desktop' and ' My nutwork places' on it.

View 2 Replies View Related

VBA - Use Command Button To Obtain Save As Screen And Save As PDF

Jun 22, 2014

I have a UserForm in which i have inserted a CommandButton. I also have a Table on a Sheet in Excel that i would like to save as PDF.

When i click the CommandButton on the UserForm i would like the SaveAs screen to come up and have the Table (or Used Range in the Excel Sheet) as the selection to be Saved as .PDF format.

View 3 Replies View Related

Code, That Disables Save, Save As And Close Commands

Nov 2, 2009

Each of the worksheets in my model use A1 as a control cell for any errors and inconsistencies. My aim is to disable save and close commands in case A1 is not equal to 0 in any of the worksheets.

The code I currently use for that purpose is as follows.

View 2 Replies View Related

Save Workbook Using Variable For Save As And For A New Folder Name

Jul 31, 2009

I have figured out how to save the workbook using a variable to saveas but I would like to create a new folder to place the new workbook into. I have tried a few things a am not having any luck. I recorded a macro and the code it produced is as follows.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved