I have 65,000 rows of numerical data in column A. In column B are selected values from A. I need to put values from non empty cells in column B to C and "stack" them in a contiguous column with no empty cells. (Please see attached).
I'm running into an overflow stack with a fairly large MACRO program. Will chopping the VBA MACRO into call routines reduce the stack size of the MACRO?
I added some code I got today and now when it runs i get the code 28 out of stack space.
Basically when the If has determined which macro to run, once that macro has ran that should be it.But if deletedates2 has ran, it reverts back to deletedates and starts again, then I get the error:
Sub deleteDates() Dim sh As Worksheet Dim lr As Long Application.ScreenUpdating = False '# Determin if (O:O) has been deleted#' If Application.CountA(Range("$O:$O")) = 0 Then Call DeleteDates2
Is there a way to stack toolbar buttons on two rows instead of one row?
I have a floating toolbar that is created when a workbook is opened. The toolbar has 16 buttons (all in a row) and gets in the way because it is too long.
I would like to display the toolbar with two rows of eight buttons instead of one long row of 16 buttons.
Is there a way to create a floating toolbar that when created will display the first eight buttons and then “wrap text” /”carriage return” itself and then display the final eight buttons?
I've got this code to display a certain cell from multiple files, and functionally it works, but I get a out of stack space error after it runs for a while. I'm sure this is because the loop doesn't know when to stop, which I thought would be solved by having " Do Until sBook = "" " instead of Do; however, then the code will not run at all.
Private Sub Worksheet_Calculate()
Dim sBook As String Dim sFilePath As String
On Error Resume Next Application.EnableEvents = False
I am trying to determine if anyone has seen a problem like the one I am about to describe. I have created a huge Excel Program with multiple modules and and several macros in each module. Each macro performs a function and then hands of to the next macro. The overall program is sometimes required to go back through almost the entire process once or twice depending on the data it is handling. My problem is that at the end of the procedure, when the last macro runs and gets to the final End Sub, instead of shutting down, it starts going back through the other end subs of the previous macros. I have toggled it one move at a time and it goes from the last macro, back through each of the previous macros, following the call stack in reverse order. in some cases, it will go to the end sub, and then go through the last commands that it went through in that particular macro, repeating steps already taken and devestating the data with orders that should not be repeated. It finally will lock upwhen it gets to a place where an order is given for the macro to go someplace that no longer exist due to previous, PROPER macro execution. Has anyone here ever seen any behavior like this out Excel? The only time this does not happen is when the data the program its handling does not require Excel to repeat its travel through the macros a second or third time.
I have a spreadhseet with lots of sheets. Instead of scrolling across to see ones out of view, it would be really neat if the view of the sheets could be stacked to show them on multiple rows.
Trying to convert an Excel 2003 macro to work in Excel 2007.
The problem line is
Dim MyDataObject As DataObject
I suspect the problem is a Missing Reference, but I cannot figure out which one. I have the same ones (in 2007) as 2003 except for one which is not showing
Microsoft Forms 2.0 Object Library
Is this the one it needs? It is called something else in 2007?
The ones I do have ticked are
Visual Basic For Applications Microsoft Excel 12.0 Object Library OLE Automation Microsoft Office 12.0 Object Library Microsoft ADO Ext. 2.8 for DDL and Security Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.8 Library Microsoft Scripting Runtime Microsoft XML v2.6
the first time font.bold is set to true, it completes w/o error. The bolded line returns 'application defined or object defined error 1004'. Ive tried activating the new sheet immediately before setting bold (like the first time it gets set) but it still errors.
I have problems with setting Validation input title and message. When in column "C" I type product code, data validation of corresponding cell in column "D" changes to list of diameters allowed for that product. That works fine. But i also want to set validation message to show allowed diameters.I set it in VBA using named ranges. But for every second line (13, 15, etc on attached file) I get an application-defined or object-defined error. The rest (14, 16 etc) works ok.
I am using Microsoft Excel 2010 and Microsoft VBA 7.0 on my system. I would like to eventually create a PowerPoint and insert charts generated in the Excel workbook. In the meantime, I cannot get the basic PowerPoint created.
The line in red is highlighted blue when the compile error "User-defined type not defined" message box appears.
Public Sub TryAgain() Dim myPowerPoint As PowerPoint.Application ' ' do nothing for now 'End Sub
I have set the references such that Microsoft Project 14.0 Object Library is indeed checked. The Excel file only contains this code in a module. All sheets are blank. Nothing else is written yet.
I have a very strange problem in DEBUG mode, because i get this error "Application-defined or object-defined error" when referring to a cell and assigning it a value so it goes to my error handler and i have a Resume Next there. It continues to go through the code whilst continuing to go to the error handler but when i step out of the function it restarts again from the beginning on the called function and then on the second run of my code it seems to WORK!?! So i'm thinking what the hell is going on, it falls over and fails the first time round and works the second time round? In free-run mode from excel i just get a #VALUE!
I am having some trouble with a variable range selection within a regression. I keep getting an "application-defined or object-defined error." I've isolated each statement to find that the code that is causing the regression not to work is below (the error for that line of code states that the Select method of Range class failed):
I'm trying to enter a series of formulas into a worksheet using vba. However, this code is giving me Run time error '1004', along with the description in the title. This is the first formula (they're all relatively similar).
I'm trying to figure out why I can run a bit of code on my machine but on another machine I get an: Application-defined or object-defined error. The code is in an excel file on a network drive and it pulls up a form, once the form is submitted it runs some code that looks like so