Concatenate VBA syntax

Joined
Apr 15, 2011
Messages
1
Reaction score
0
Hello all,

I hope you can assist me with a dilemma I'm having.

I have 2 cells I need to concatenate into my summary sheet. This is the code I'm trying to make work. If I omit '!BX8 I can get '!BX7 to populate, but once I add the reference for BX8 I get errors. Any thoughts?

Code:
Dim LastSheet As String
    LastSheet = Worksheets(Worksheets.Count).Name
    With Worksheets("Summary")
    lMaxRows = .Cells(.Rows.Count, "H").End(xlUp).Row
    .Range("H" & lMaxRows + 1).Formula = "='" & LastSheet & "'!BX7 & '!BX8"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top