workbooks.add

  1. L

    workbooks.add, open and close

    Hi Can I say workbooks.add is the same if you open Excel program -->New ? same thing workbooks.open is the same if you open excel program --> Open Also, workbooks.close is the same thing if you click on [x] to close Excel program? Thank you.
  2. E

    Elseif macro to skip macro and execute another macro if conditions are not met

    I want to create a macro that will create new sheet and save the same if the value in particular cells are >0 I created one but its only saving one sheet at a time and not moving to second macro if the value in first cell is >0 Please assist Sub if_1()If Range("c2").Value > 0 Then...
  3. A

    What are the default number of sheets created by Workbooks.Add???

    Hi all, I was re-writing an old macro, and I needed to create a workbook with 11 sheets. So I set Application.SheetsInNewWorkbook = 11. This worked, but I noticed every computer that macro runs on now creates new workbooks with 11 sheets ... I need to figure out the correct number of...
  4. R

    Need Help With PasteSpecial

    Hello... I do not understand why this I pasting blank rows - With WsTemplate .Range("A1:E" & LstRow).Copy With Workbooks.Add With .Sheets("Sheet1").Range("A1") .PasteSpecial Paste:=xlPasteColumnWidths End With End With End With Thank You...
  5. Johnny Thunder

    VBA Question - Changes from Excel 2013 to Excel 2016 - Workbooks.Add Syntax Issue?

    Hi Group, Had a question and curious if anyone knows an answer for this: I recently had my company switch from Excel 2013 to Excel 2016 and I noticed several reports with Macros have all recently been crashing and getting Errors that are around lines of code like Workbooks.Add and the solution...
  6. G

    Creating a new workbook from a worksheet that contains formatting and pictures.

    I've used Excel to create a group summary page worksheets in a workbook file that is a combination of data pulled from and calculations based on data from about 5 spreadsheets. The summary page(SP) is heavily formatted and uses merged cells extensively(customer requirement). This SP also...
  7. M

    Run-time error '9': Subscript out of range error when adding a new file

    This is my first post as a new member. I have read a great many previous posts in the past and found the information to be very helpful. However, this time I have not been able to find an answer to solve my problem. My problem is that I get the Run Time Error 9 after adding a new file and...
  8. Maximus Tatius

    Adding a BeforeClose event to a Workbook created using Workbooks.Add

    I have a fairly complex workbook which contains a worksheet I use as a template for a new workbook - I populate this as part of a long script which fires when I click a command button on a form, then copy this sheet to a new workbook which I create and save in the same script. This works fine...
  9. M

    Browser Excel different to MS Excel SaveCopyAs debugging

    Hi, I have an Excel Sheet with some questions on it and I send this this worksheets with VBA code which works in MS Excel but when you put this file on a webpage the Thisworkbook.SaveCopyAs mypath & myfilename debugs. The code is below. Sub SendMail() Dim Msg, Style, Title, Help...
  10. B

    VBA Code- Move Records to different worksheets based on conditional logic

    My objective is to parse out records in a single workbook into multiple workbooks based on certain field values for a particular record. As an example, let's assume I had records where a Line of Business field was equal to A,B,C, or D. The ideal code would take all records where Line of...
  11. U

    Workbooks.add usually crashes Excel w/ WebPage

    I apologize for the long message. I've done a lot of testing and scouring the web to isolate the issue and am only posting here. I am using Excel 2007 on Windows XP (32bit) and Windows Vista (64bit). Background: My process loads up single web pages (.htm), does stuff, puts the data onto...

Some videos you may like

This Week's Hot Topics

Top