I have a code that automates Excel from Access DB
I want to use a variable to enter a value in a cell 3 rows after the final row.
I have this variable to get the final row
finalrow = objApp.Cells(objApp.Rows.Count, 1).End(xlUp).Row
I have a currency variable i want to enter into the cell
Dim Balance as Currency
If i try to use
objSheet.Range("A" & finalrow + 3).Value = " & Balance & "
The string & Balance & is the one entered in the cell . Not the value of the variable.
But this one works
objSheet.Range("B14").Value = "Below is Accountability for Petty Cash of 2,000,000 UGX taken on " & Me.Transaction_Date
i.e the value of Me.Transaction_Date is entered into cell B14 plus the string part
Is there way of making it work?