ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro Help (https://www.excelbanter.com/excel-discussion-misc-queries/264235-macro-help.html)

BigO

Macro Help
 
how do i assign a value of a cell to a variable in a macro

Gary''s Student

Macro Help
 
This sets the variable:

Sub dural()
Dim r As Range, v As Variant
Set r = Range("A1")
v = r.Value
End Sub

to set the cell, reverse the equation.
--
Gary''s Student - gsnu201003


"BigO" wrote:

how do i assign a value of a cell to a variable in a macro



All times are GMT +1. The time now is 04:16 AM.

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