Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() My understanding of vb is not very good. If ActiveCell.Column = t Then ActiveCell.Offset(0, -1).Text = "25" else ActiveCell.Offset(0, 1).Text = "25" I have a button between two columns in the center of the screen. I want the user the to select a cell from one of the two columns, then select from one of the buttons in between the columns that will assign a value to the cell on the outside of each column. -- famdamly ------------------------------------------------------------------------ famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382 View this thread: http://www.excelforum.com/showthread...hreadid=519085 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
If ActiveCell.Column = t Then ActiveCell.Offset(0, -1).Text = "25" Else ActiveCell.Offset(0, 1).Text = "25" End If , or ActiveCell.Offset(0, Iif(ActiveCell.Column = t,-1,1)).Text ="25" Arvi Laanemets "famdamly" wrote in message ... My understanding of vb is not very good. If ActiveCell.Column = t Then ActiveCell.Offset(0, -1).Text = "25" else ActiveCell.Offset(0, 1).Text = "25" I have a button between two columns in the center of the screen. I want the user the to select a cell from one of the two columns, then select from one of the buttons in between the columns that will assign a value to the cell on the outside of each column. -- famdamly ------------------------------------------------------------------------ famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382 View this thread: http://www.excelforum.com/showthread...hreadid=519085 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Thanks, I tried each of those and each brings back a run time error 424 object required. -- famdamly ------------------------------------------------------------------------ famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382 View this thread: http://www.excelforum.com/showthread...hreadid=519085 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
The 't' in your formula is a column label, not a variable? Then If ActiveCell.Column = 20 Then ActiveCell.Offset(0, -1).Text = "25" Else ActiveCell.Offset(0, 1).Text = "25" End If , or ActiveCell.Offset(0, Iif(ActiveCell.Column = 20,-1,1)).Text ="25" Arvi Laanemets "famdamly" wrote in message ... Thanks, I tried each of those and each brings back a run time error 424 object required. -- famdamly ------------------------------------------------------------------------ famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382 View this thread: http://www.excelforum.com/showthread...hreadid=519085 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I kind of thought that might have something to do with it. Thank you very much for your help. -- famdamly ------------------------------------------------------------------------ famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382 View this thread: http://www.excelforum.com/showthread...hreadid=519085 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Darn, it is still not working, same error, and I did have a cell selected. -- famdamly ------------------------------------------------------------------------ famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382 View this thread: http://www.excelforum.com/showthread...hreadid=519085 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Macro help - copy a cell down | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
Issuing macro in workbook from separate workbook | Excel Discussion (Misc queries) |