Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel Active Cell

I have a Visual Basic command button on an Excel worksheet. When the command
button is clicked I need the code to make use of the column number of the
active cell. How is this found?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Excel Active Cell

try ActiveCell.Column

this will return 1 for column A


--


Gary


"gazza" wrote in message
...
I have a Visual Basic command button on an Excel worksheet. When the command
button is clicked I need the code to make use of the column number of the
active cell. How is this found?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Excel Active Cell

Try something like this

MsgBox ActiveCell.Column

activecell.entirecolumn.select

or whtatever...

--
HTH...

Jim Thomlinson


"gazza" wrote:

I have a Visual Basic command button on an Excel worksheet. When the command
button is clicked I need the code to make use of the column number of the
active cell. How is this found?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use the active cell in an Excel formula EPMMGR06 Excel Worksheet Functions 3 May 15th 23 07:45 PM
How do I get the coordinates of the active cell in Excel? Jim Stuart Excel Discussion (Misc queries) 9 April 3rd 23 01:25 PM
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
How do I shade the active cell in excel RogerK Excel Worksheet Functions 1 July 11th 06 04:03 PM


All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"