My excel file triggers excel to crash after clicking the only button on my worksheet. The button displays a userform.
However; this does not always happen. It actually drives me crazy as I don't find the solution to my problem. My company were I work upgraded my Excel 2003 SP2 to Excel 2003 SP3 which seemed to help but now the same problem returned...
I found a temporarily workaround though; when saving the file first (right after I opened it) it doesn�t crash when showing the userform. Very strange (to me).
the spreadsheet needs to be copied to a directory called "C:downloads" as it contains a ODBC query to itself (In reality, this is a query to an External Oracle Database)
On loading, it should pop up a simple userform, with a combo and two command buttons, which when pressed takes you to a (hidden) tab that displays a pivottable.
All works well until I try to close /save when 60% of the time, Excel encounters problems and closes and will not load up the file the next time until either quit excel or disable macros. Messages include "file/path access error", "I/O Error" or get restarts excel.
On a casual run through, I expect you might report back that "All worked ok for me". Please can you give it a bit of a thrashing, comment out the userform show, save the file (frequently) becuase i assure you it will break ultimately!
This is a brand-new file and I've tried it on about 5 different PC running different versions of Excel and generally get the same result.
The attached spreadsheet is as simple as it gets - a single userform with a combo box that allows 1 of 4 choices. It gets loaded and displayed in the workbook_open() event - or at least it should - but 9/10 times i get the message "Path/File error" and debug crashes out on the userform.show line. The next time I try and open the file (despite not saving it) Excel crashes and closes! Even re-starting Excel does not allow the file to be opened!
If, however, I open the file with macros disabled, and go into the VBE and manually run the workbook_open() all works fine. I'm using Excel 2003 and I've tried it on other installations - sometimes it will work, other times not.
I've tried every combination of userform load, unload, hide & show with similar results.
i have a user form which is activated by a button. when this button is clicked excel crashs every now and then. i get an error message run time error 75, could not find object. it asks me to debug or end. whatever option i choose when i try to save the worksheet there after excel crashs and closes. any body else have this problem, what could be the cause?
I am trying to allow users to select a file, and then the file name/ the file path / and date are added.
Right now, all those functions work in the following code, but the file path shows up as a letter drive. As there could be upwards of 50 people using this file and the mapped drive could be different, i wanted the full path to be displayed.
We have built quite a large Excel based program that contains quite a lot of coding. the program seems to work fine the majority of the time but every so often we recieve an error message that causes excel to not save, or to crash and shut down.
The message that comes up is "File/Path Error"
Now I've just done some hunting around online and some links I have found speak of declairing the document location correctly in the coding. I was wondering could this be the issue at hand?
Anytime the document needs to save, there is a cell with the directory path and file path declared as a variable (Actually as Dim String) within the coding. Is this the best way to declare a file path?
Also, the problem seems intermittent. We Compile the VBA coding before saving, we also use a Clean Project add-in within Excel. These processes usually help but every so often the problem comes back.
I have a userform that is working perfectly, but when I try to make it an add-in I can't even get it to load. When loading the userform as an add-in I get the error "Run error nr. '9'.: The Index is out of the interval" (freely translated from Swedish to English). The code I'm using to load the userform is
I've created a userform on one computer which launchs when I open the excel workbook. The userform contains comboboxs and a picture. But when i saved it on another computer and tried to open it and it errors. (Run-Time error 9). (Still works fine on the computer that created it). All references are to this workbook only. Userform is contained within the Forms folder of this workbook(not personal.xls) and the userform name is PDM_SPLASH1. Also, if i go into VBA I can see the form, but it wont launch when i try to play in manually. (Run-Time error 9)
Ive created a userform that I want to have input data into specific cells in my worksheet. I have the userform created, and some of the other VB stuff written, but it is far from being functional. I have come across the first of what to is to be many problems (Im pretty rusty at VB).
I have a button on my spreadsheet that is supposed to show the userform using this macro
When I click the button, it breaks at "Form1.Show" giving me "Run-time error 424 : Object Required".
I created a form that my employees could use to log their work. When I toggle between the combobox and the qtytextbox I get an "invalid property value" error that debugs to the line of code that opens the userform. I have no idea how to fix this. The spreadsheet has a button that shows the userform. This code is:
Private Sub rectangle1_click() If frmLCWork.Visible = False Then frmLCWork.Show Exit Sub End Sub
The userform has a combobox for employees to select the completed "task", a quantity textbox and then an "add to log" button. The form code is:
Option Explicit Private Sub cmdAdd_Click() Dim sStep As String Dim Row As Long 'check for a task If Trim(Me.cbxTask.Value) = "" Then Me.cbxTask.SetFocus MsgBox "Please specify which task you completed." Exit Sub End If....................
I have a variable ("DestFile") that defines a path to a file (used in saving the file)...
I'm in the process of getting a Sub to hyperlink to this file, but in some circumstances, I may only want to hyperlink to the folder, not the actual file...
How would I go about trimming the "DestFile" address to get a "DestFldr" address?...
An example of "DestFile" might be; S:BryanFor KenGulf ConstructionST0609014-t.xls (the file name length may vary) What code can I use to consistently trim it back to; S:BryanFor KenGulf Construction as the "DestFldr" variable?
Private Sub CommandButton1_Click() Call ShockwaveFlash1.SetVariable("testVar", "Message B") 'This sets the _ value of the variable in the Flash Project. End Sub
Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String) Text1.Text = args 'this catches the action sent by Flash, and uses it in the TextBox. End Sub
Private Sub UserForm_Activate() Call ShockwaveFlash1.LoadMovie(0, CurDir + "/vbSample.swf") 'This loads the movie that was made into level 0 of the project. End Sub
(I got from this link http://www.kirupa.com/developer/mx/flashvb.htm) As you can see I have adapted it to work in Excel 2007. Now - when i first run it - the flash file loads and shows in the userform. The only nag being that the .swf file doesnt pass the text into the textbox on the userform. But once i exit the Excel workbook and reload it - the .swf file doesnt show up at all no matter what i do.
On sheet4 is a list of dates and I named that range as UPDATES2013. Each cell in that range is a hyperlink. Sheet1 cell I3 is a data validation list with the named range UPDATES2013 as the list. When a selection from Cell I3 is made I can get it to follow they hyperlink with the code I have. The problem I am having is if there is no file found, then I would like my Userform1 to show. I have tried several different things with the code, but every time I think Im going to get it to work....it doesn't. It either wont show the Userform at all, or it shows it even if the file is found. I am currently putting the code to run the macro on the worksheet module using the worksheet_change event.
One last thing...I also have hyperlinks throughout Sheet1 that will lead to the same files as in the named range UPDATES2013 from sheet4. I need the same thing to happen if they click one of these hyperlinks instead of using the data validation list in Cell I3. Is there a way to make one code that will show Useform1 if a hyperlink is selected and the file cannot be located (whether it be by the individual cells on sheet1...or the data validation list in Cell I3)?Here is the code I am using right now.
VB: Private Sub Worksheet_Change(ByVal Target As Range) DoFollow2013 ActiveCell End Sub [code]....
I have a range named "start" and I have a form named "fMenu". I have used this same code in other spreadsheets to have the userform automatically become visible when the spreadsheet is opened and it works in other workbooks. Apparently I have been struck with the stupid stick this morning. I have a hotkey of "M" and when I use control M the form shows up and the macros invoked by each button on the form are working properly.
Sub open_menu() Application.Goto "start" fMain.Show End Sub
This code appears to do opposite of what I intended i.e., when I click 'Yes' button it closes the file without saving; and when I click 'No' button it closes the file with saving?
Private Sub btnExitNewPipes_Click() If MsgBox("Save the Data?", vbYesNo + vbQuestion, "File Save") = vbYes _ Then ActiveWorkbook.Close SaveChanges = True ActiveWorkbook.Close SaveChanges = False End Sub
It is a simple form which has a Module/Macro to load the form on clicking a shape. Although the form works fine for me it occasionally crashes for other user. The Debug says that there is an error in the Module with the line "frmCallData.Show". Below is the Code for the form and also the Module: ....
I worked really hard on this userform for a work project - my first and likely last attempt at coding!
It used to work, and then I changed a bunch of listboxes to comboboxes, and now my file gives the 'Excel has encountered a problem and needs to close' error - but ONLY when I'm working directly with the excel file and NOT when I've got VBA open.
Compiling shows no problems - I have no idea what to do because this is a very important file for work and I am a very inexperienced coder! ...
I have a very strange error at present. I am saving a sheet as a file using VBA from within Excel and when I run the program from the environment of my flash drive it works without a problem but when I run the same code on my main PC it causes an error :
Run time error 1004 Method SaveAs error ... and it causes Excel to crash and then recover the file.
I have a UserForm appear when the user opens my file. It prompts them to enter some data. If they Close (Terminate) the Window, I have a MsgBox appear telling them they must enter data - and allow them to go back or exit. When they opt to go back the UserForm reapears but Excel freezes and I have to force quit.
Here is the code for my UserForm, including the Sub for when the User clicks OK (CommandButton1) and the Sub for when the User terminates the window:
VB: Private Sub CommandButton1_Click() Dim Blank As Integer Dim Subgroup As Integer [code]....
I run a macro which runs saves the active file to a different location to ensure that I retain the original like so -
If ActiveWorkbook. Name = "KEY_DATA_CFT77" + ".xls" Then ActiveWorkbook.SaveAs Filename:= _ "H:HOME imcEXCELKEY_DATA_2006KEY_DATA_2006_01KEY_DATA_CFT77_01.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False End If .................................
Hi all, I've reinstalled office 2007 because excel 2007 was crashing very often when inserting new rows or when saving the file. I tried with other files and apparently work fine. The specific file can be opened but I don't know if is corrupted, I tried repairing it with open and repair from the file open menu but didn't work (it is still happening the same). I've been working on the file during few days and wouldn't like to start from scrath again, can anyone help me with this?
I have a userform where the user clicks a command button to select a gif/jpeg using the getopenfile function, the file path a is then loaded in to a text box and loaded in an image. I noticed that when the user cancelled before selecting a file it caused a crash. I have added some code to prevent this but now it crashed when an image is selected.