ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I return a Cell reference to a variable. (https://www.excelbanter.com/excel-programming/288695-re-how-can-i-return-cell-reference-variable.html)

tolgag[_8_]

How can I return a Cell reference to a variable.
 
Hi, it's possible in several ways. I use the following method :

Dim rngCurrent as Range

Set rngCurrent = Selection

then you can format this range like this :

rngCurrent.Font.Size = 8

But if you put this code in selection change event and make a drop'n
drag, selection will change and probably you'll create an error.


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 07:24 PM.

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