ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referencing Excel Cells (https://www.excelbanter.com/excel-programming/371220-referencing-excel-cells.html)

markvdh

Referencing Excel Cells
 
Hi Guys
Very new to VBA - can anyone help?
I need to reference a value (which might change) in cell F5 in some VBA
code.
For example I need to say . .. If (the value of F5) is StartDate Then
....
Thanks
MarkvdH


Carim

Referencing Excel Cells
 
Hi,

Dim StartDate As Date

If Range("F5").Value StartDate Then
your code
Else
your code
End If

HTH
Cheers
Carim


markvdh

Referencing Excel Cells
 
Hi Carim
Thanks for your help
MarkvdH


Carim wrote:
Hi,

Dim StartDate As Date

If Range("F5").Value StartDate Then
your code
Else
your code
End If

HTH
Cheers
Carim




All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com