Home

Macros and VBA

38 Conversations

Latest Activity

Custom List Message Item
Hi Everyone,
I am comparing the two Dates in the two columns (D and E).
The Dates in column D are source Dates and the Dates in column E are Start date of the Project.
I am calculating the difference in two Dates as weeks and pasting the result in the column
... Read More
94 Views
9 Replies
I am wondering however, why are you using VBA and not a formula combined with some conditional formatting?

Something like:

 

Sub dateCompare()

zLastRow = Range("D" & Rows.Count).End(xlUp).Row    'last data row

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For r = 2 To zLastRow

If Cells(r, "
... Read More
I have created and save a macro under the 'personal' workbook.. to my understanding, each time i open an excel file, i could execute the macro instantly.. BUT instead, i have to keep unhiding the macro each time i open a new excel file before i can use th... Read More
41 Views
0 Reply

I created a command button with a VBA code to print invoices for clients.  Yesterday, when I clicked the button it worked, but now when I click the button nothing happens.  I have tried all the fixes.  I have deleted the button and reset it.  I have gone

... Read More
62 Views
1 Reply
I'm not sure but it might be worth checking the Trust Centre for Active X and Macros

PLS HELP!

I DOWNLOAD EVERY WEEK A NEW REPORT OF MY DATA BASE, BUT I APPLY THE SAME 3 MACRO VBA THAT I NEED TO COPY ALL THE TIME FROM MY PERSONAL.XLS.

1. HOW TO I MAKE THIS PROCESS AUTOMATIC??

2. ALSO, I WANT THE MACROS TO RUN AUTOMATICALLY WHEN I OPEN THE NE

... Read More
98 Views
3 Replies

Hi,

 

One possible option would be to connect your Excel file to your data using Power Query ('Get and Transform' in Excel 2016+), have all three macro in the same file, th

... Read More

I recently ran updates for MS Office and version of Excel is 2016  MSO (16.0.8067.2115) 32-bit.

 

VBA code that worked perfectly prior to the upgrade now causes Excel to crash at the same place every time.  A portion of the code is below.  It does not give

... Read More
57 Views
1 Reply

Does it also crash if you try copying another worksheet?

Hi,

I'm new in VBA.  I've been reading and seeing courses on internet this last three days and triying to understand every single line in this code, but I cant read completely all.

Could someone try to explain the reason of the parts with bolt and underline

... Read More
90 Views
3 Replies

Hi Kamu,

 

Here are some explanations

 

InStr(varCheckNumber, C_SEPARATOR) > 0

This function finds the position of the first occurance of "." in the string. If you function re

... Read More

I want to connect Excel to Micro focus Rumba using VBA. can anyone provide VBA code for establishing connection?

39 Views
0 Reply

Hi

 

Is there anyone out there who can help with this?

 

I'm creating a workbook for others to use, so I am aiming to include as much automation as possible.

 

I need to update 50 sheets, all in the same workbook so that they have a common footer based upon eit

... Read More
85 Views
4 Replies

Hi Keith 

 

This is the basic code

Sub RenameFooters()
Dim wks As Worksheet

For Each wks In Worksheets

wks.PageSetup.LeftFooter = Range("FooterText").Value
' note you ca
... Read More

Hi All,

 

I have a worksheet that serves as a data entry form & another worksheet that stores historic data.

I would like to be able to enter the new data in the data entry form & then by macro, paste the new data into the history storeage worksheet. Obvious

... Read More
109 Views
1 Reply

See if this gets you started:

 

Sub foo()
    Dim lr As Long
    Dim wsSource As Worksheet
    Dim wsDest As Worksheet
    
    Set wsSource = Sheets("Input")
    Set wsD
... Read More

Hi I recently used the following Macro, provided by Gary's Student, to create a PDF from an active sheet, generate a unique Filename based on a cell ref and save it to a specific location.

 

This macro works well for me, however, I would like to add to it s

... Read More
200 Views
5 Replies

This is code I use.

End Sub

Private Sub Email()

    Dim objOutlook As Object
    Dim objMail As Object
    Dim signature As String
    Dim oWB As Workbook
    Set oWB = Ac
... Read More
Best Response
Further to my previous post I have managed to adapt the code to do what I required: 1. Create a pdf of ActiveSheet 2. Save pdf into a specific location 3. Name the pdf wi... Read More

Hi Team,

 

Request you to provide me a professional training on excel.

45 Views
1 Reply
Excel Campus seems to have a good training program. Visit them here: https://www.excelcampus.com/ Read More

I've written an Excel add-in in c++ that uses a .CHM file as a help resource, this worked fine in Excel 2010 but after installing Excel 2016 it appears that online help is the preferred option and my help file is ignored. As my colleagues use the add-in i

... Read More
53 Views
2 Replies

Are you sure it isn't simply Windows blocking the chm file?

Hello,

 

I'm looking for a macro or something to compare two differents sheets.

A little background, I have one sheet with a lot of names and numbers, and I have another one with a Dynamic Table with the same persons (this is an imported document).

I have to

... Read More
49 Views
0 Reply

Bonjour

 

Je doit faire une macro pour modifier un privilège avnat de cliquer dessus:

Exemple  

1- je suis sur une cellule Excel ou est écrit "cl99999"

2 - je souhaite modifier le lien suvant:

Dynamicsnav: // **** - nst2: 7046 / NST_DEV / **** / runpage? Page =

... Read More
27 Views
0 Reply

Hello.

First I must admit, I am not a VBA programmer, but aspire to learn.  I have a complex sales report that is saved in Excel spreadsheet format, with several sub-totals for customer and product.  The key field of customer number and product number are

... Read More
102 Views
2 Replies

Hi to all!

 

With this code, you can do it easily:

 

Sub FillRange()
    With Range("A2:A10")
        .SpecialCells(4) = "=R[-1]C"
        .Value = .Value
    End With
End Su
... Read More

Hallo,

 

below a sample function, you surely must adapt to your requirements. The code reads the specified range values into an array, replaces the empty values of its firs

... Read More