Copy and paste specific cells from one spreadsheet to another

I have a spreadsheet Sheet1 I have a row with some cell values as shown in Image 1. I am having a problem trying to copy and paste cells from one worksheet to another in excel. As shown in the below Image 1, I have a row with values and I want to cop

Email - How to place the cursor at the end of the text body?

I am using the answer (i.e. the code) to this question Working with current open email to build an email in steps. Every time I run the macro, it adds a piece of body text to the existing body text of an open email. The problem is that if I manually

How can I filter a specific value in VBA?

Dim rng As Range lMaxRows = Cells(Rows.Count, "I").End(xlUp).Row` Set rng = ActiveSheet.Range("A1:K" & lMaxRows) FilterField = WorksheetFunction.Match("Description", rng.Rows(1), 0) If ActiveSheet.AutoFilterMode = False T

Excel VBA Borders Depends on the Size of the Page

I want to create borders around each of my excel pages dependent on the size of the page e.g. number of rows and columns can vary all the time. I've tried this but it's specific cells Sub AddBorders() With Range("B8:I10") .Borders(xlEdgeLeft).Li

Game update time

I'm trying to update an MS Access database in Excel VBA using an ADO Recordset object. When I fire the rs.Update method, I would like the following code to wait until the database has been updated before executing. It appears the database takes 3-5 s

using the cell address in the vba formula

I'm trying to use cell address in IF formula and I get an ERROR msg. I defined a AvgCell/StdCell as string, and my IF function doesn't how to read it Here is the code: Dim AvgCell As String ActiveCell.Formula = "=AVERAGE(M" & StartRow &

populate cells with VBA using cell names with Excel 2010

I hope someone can help me, but I need to populate cells with data from sharepoint. All is working OK with the following part of VB script If metaprop.Name = "Revision" Then Cells(2, 18).Value = metaprop.Value End If this puts the "revision

Set shape control of Min / Max spin button with VBA

I have a spin button on my worksheet (not in a userform), and I need to set the minimum and maximum values in VBA. Easy, right? I tried worksheetName.Shapes("shapeName").Min = x but I get Run-time error 438: Object doesn't support this property

Updated vba code and again it gives me a clue off beach error

This question already has an answer here: Subscript out of range error in this excel vba script [duplicate] 2 answers This code still gives me an out of subscript error Sub importData2() ChDir "C:\Users\Desktop\Java" Dim filenum(0 To 10) As Long

Excel-VBA - X-axis point of color if LIKE * Value *

Basically I have a chart that is created dynamically from Java (using POI) and I am passing through values that will allow specific points to be coloured in the chart. To do this I need to access the point value label so that I can test if the condit

Can anyone view the list of button IDs in Excel 2010

I would like to create costum menu button using VBA in my excel 2010 file using predefined excel button that use face id. In my case i would like to use "lock" and "refresh" icon, but doesn`t know the face id for that icon. could anyon

Argument list of the VBA function

I am looking to do something like the following: Public Function myFunc(vArg1 as string, vArg2 as string, vArg3 as ["A","B","C"]) End Function Where the user gets a drop down list for vArg3 when they call it. This would be si

Automate Onenote 2010 From Excel 2007, using VBA?

I would like to use VBA in Excel 2007 to step through about 500 receipts, which have been converted to one large OneNote 2010 notebook. Each notebook tab contains a different receipt. I need to get the pertainant details (Receipt #, Receipt Date, Amo