Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

return the value of the active column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kelvin - 21 Dec 2007 09:37 GMT
Any Ideas???

How would you capture the value the active column in a variable?

=column()    will give the value of the active column

How would I use a variable to capture that value.      val = column()   ????

I would appreciate any help

Thanks
Signature

KWB

Rick Rothstein (MVP - VB) - 21 Dec 2007 10:00 GMT
We are talking about in a macro, right? If I understand your question
correctly...

   Val = ActiveCell.Column

Rick

> Any Ideas???
>
[quoted text clipped - 8 lines]
>
> Thanks
Kelvin - 22 Dec 2007 02:29 GMT
Thanks , that seems to work ,  I am getting the value in the variable.

I am now getting an error in my vlookup when I use val instead of 33?
Any ideas?

Thanks again
Signature

KWB

> We are talking about in a macro, right? If I understand your question
> correctly...
[quoted text clipped - 15 lines]
> >
> > Thanks
Rick Rothstein (MVP - VB) - 22 Dec 2007 04:36 GMT
Sorry, I followed your lead and used the variable name you proposed in your
posting without paying attention to it. Val is a reserved key word in VBA
(there is a function by that name), so you can't use it as a variable name.
Just pick a different name and you should be okay.

Rick

> Thanks , that seems to work ,  I am getting the value in the variable.
>
[quoted text clipped - 22 lines]
>> >
>> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.