I was thinking because formulas are in D3:right...
But I can change them to be fix on lets say D3:G3. Or whatever the cells.
1.So if that can speed things up?
2.And I was thinking that someone can arrange those formulas on that range to pick them up from sheet into VBA code once automatically for start, until terminate - so to ease code to not copying them always. As array or string or whatever that method is called. Values also can be instantly after formulas calculated everything.
Probably, then DDE-handle can be first, then formulas calculate and directly into values.
Code is ok but needs more speed.
Thank you very much!
It is appreciated!
But I can change them to be fix on lets say D3:G3. Or whatever the cells.
1.So if that can speed things up?
2.And I was thinking that someone can arrange those formulas on that range to pick them up from sheet into VBA code once automatically for start, until terminate - so to ease code to not copying them always. As array or string or whatever that method is called. Values also can be instantly after formulas calculated everything.
Probably, then DDE-handle can be first, then formulas calculate and directly into values.
Code is ok but needs more speed.
Thank you very much!
It is appreciated!
Code:
Sub DDE_Event()
Dim NextRow As Long
Dim LastCol As Long
With ThisWorkbook.Worksheets("Sheet1")
NextRow = .Range("C" & .Rows.Count).End(xlUp).Row + 1
LastCol = .Range("D3").End(xlToRight).Column
.Range(.Range("D3"), .Cells(3, LastCol)).copy .Range("D" & NextRow)
.Range("C" & NextRow).Value = DDERequest(DDE_Handle, "something")
With .Range(.Range("D" & NextRow), .Cells(NextRow, LastCol))
.Value = .Value
End With
End With
End Sub
Last edited: