Computer Applications in
 
Finance

                       



Question: How can I add a constant to a cell reference through Visual Basic code.

Press Alt + F11

Insert > Modeul and copy paste the following


Sub AddOne()

Cells(1,1).value = Cells(1,1).value + 1

End Sub


Details:

Start a macro

Sub PDFmaker ()

End sub

 

What is the cell reference of A1

Cells(1,1)

 

How to get value of cell A1

Cells(1,1).value

 

How to add one to the value of cell A1

Cells(1,1).value = Cells(1,1).value + 1

How write a macro for this

Sub AddOne()

Cells(1,1).value = Cells(1,1).value + 1

End Sub

 


ĉ
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
FV.xlsx
(9k)
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
Attaullah Shah,
Apr 23, 2018, 11:50 PM
Ĉ
tvm.xlsx
(10k)
Attaullah Shah,
Apr 23, 2018, 11:50 PM