executeexcel4macro

  1. C

    Runtime error 1004 with ExecuteExcel4Macro

    I have recorded a macro and now it is giving me a runtime error 1004 "There's a problem with this formula" in connection with ExecuteExcel4Macro. I have tried with double quotes without success ExecuteExcel4Macro "(2,1,"""";;;@"""")" Can anyone point to an error in the code? Sub...
  2. S

    Return Address of String in Closed Workbook with VBA

    I have almost 900 workbooks that I need to mine for data. These workbooks are nearly identical, but through the years the addresses for certain info has changed. I currently have a macro (below) which works nicely that opens each WB, looks for my defined string, and returns the location. For...
  3. T

    ExecuteExcel4Macro to set column width

    How can I use ExecuteExcel4Macro to set a column width? The reason I want to do this instead of through VBA is that ExecuteExcel4Macro seems to keep the Undo stack intack whereas VBA will clear the Undo stack. I tried this but it didnt work: Application.ExecuteExcel4Macro...
  4. Queenofmycastle

    VBA to choose printer

    This is one of my most used VBA formulas. I want to share my file with other offices. Is there a way to have it so that the printer can be changed without knowing VBA? Thanks so much! Sub PrintEntireSetJ6() Dim i As Integer Application.ActivePrinter = "iR-ADV C350 PCL 5c on Ne06:"...
  5. C

    How to use VBA to check if sheet within an external file exists - Using Excel 2010

    I am creating VBA code. I need to check to see if a certain sheet exists within an external file. I would like to do this without opening up the external file. I am currently using this code: Private Function CheckForSheet(ByVal wbPath As String, wbName As String, wsName As String) As Variant...
  6. E

    Using ExecuteExcel4Macro() opens the file browser

    Hi everyone, I'm a bit new to VBA. I'm attempting to create an excel 2010 VBA script which grabs a the value of a single cell from a closed existing workbook. Private Sub CommandButton1_Click() Application.ScreenUpdating = False p = "U:\path" f = "File Name.xlsm"...
  7. E

    Create conditional formatting to indent data by VBA gives runtime error on ExecuteExcel4Macro

    Hi! I am trying to create conditional formatting rules via VBA. I often use a custom number format to indent lines of text based on some level indicator. The custom number format is then something like '" "@' to indent by 3 blanks. Then I can embed this within a conditional format with...
  8. L

    VBScipt ExecuteExcel4Macro PAGE.SETUP Font, Style not working

    Hello All, I am currently using Excel 2007 on Windows 7. It should be noted that I am developing this script to run on multiple versions of Excel (2003,2007,2010) as well as multiple versions of Windows (XP,7 and possibly 8) I really need someone's help with a "Working" example of an...
  9. D

    How to use Executeexcel4macro to fill a formula in a textbox

    Hi When am using like this, It is working fine Sheets("BBS Sheet").Shapes("TextBox " & pictureRow & "1").SelectExecuteExcel4Macro "FORMULA(""=R4C9"")" But When am using like this, it is not working what would be the problem Sheets("BBS Sheet").Shapes("TextBox " & pictureRow & "1").Select...
  10. T

    ExecuteExcel4Macro Conditional Formatting - Phone Number Format

    Hi all, I tried searching the form to see if I could find an issue similar to mine - I came up empty. I'm trying to apply the phone number format ([<=9999999]###-####;(###) ###-####) to each phone number cell in column D if the cell in column N is equal to "United States of America". Here is...
  11. R

    calling ExecuteExcel4Macro from Access 2010 VBA module - can't seem to get reference right

    These are my code fragements after many attempetd failures to call the ExecuteExcelMacro from an Access 2010 VBA module. Access referencing Excel (in code window, References, Excel checked) is a preferred way to create reports from MS Access 2010. Just can't seem to get the object reference...
  12. G

    ExecuteExcel4Macro syntax

    Hi everybody, If somebody could give me some guidance here, it would be much much appreciated. Quite new to VBA and trying to create a macro (assigned to a button) that expands and collapses the first column of a pivot table. And have been trying for 2 hours now :( So far, I just used the...
  13. Jaafar Tribak

    XLM to read data from a closed workbook. Anybody Knows ?

    I know how to read a cell value from a closed workbook using the XLM macro ExecuteExcel4Macro . Is it possible to write to a cell in a closed workbook using a similar approach obviously without opening the workbook. I am not looking for an ADO or other solution . I am specifically asking if...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top