Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Value not shown on selected ActiveCell

I have the following code attached to a macro. The macro is associated to a
command button. When the command button is clicked, this macro will ve
invoked and the display/place the result into ActiveCell.

Problem I have is that the macro knows which is the active cell but unable
to place the value in there. Can someone please help to let me know where is
my problem ?
----------- Code Start ---------------
... Other codes ....
If ActiveCell.Column < 4 Then
MsgBox "Sorry! Invalud column selected. It must be on column D",
vbExclamation, "Column Error"
Exit Sub
End If
Select Case Cells(28, 3)
Case 0
ActiveCell.Value = ""
Range(Results_Cell) = ""
Case 1
ActiveCell.Value = ""
Range(Results_Cell) = ""
Case Else
ActiveCell.Value = "Hello" ' Test to see Hello will be place
in active cell.
'ActiveCell.Value = Item(Cells(28, 3) - 1
Debug.Print "Cell(" & ActiveCell.Row & "," & ActiveCell.Column &
")=" _
& Cells(28, 3) & " " & Item(Cells(28, 3) - 1)
End Select
----------- Code End ----------------

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Value not shown on selected ActiveCell - Fixed

Well. I just fixed my own problem which was caused by a clear active cell
line on certain codndition in the wrong place in codes below this segment of
code.

"Wellie" wrote:

I have the following code attached to a macro. The macro is associated to a
command button. When the command button is clicked, this macro will ve
invoked and the display/place the result into ActiveCell.

Problem I have is that the macro knows which is the active cell but unable
to place the value in there. Can someone please help to let me know where is
my problem ?
----------- Code Start ---------------
... Other codes ....
If ActiveCell.Column < 4 Then
MsgBox "Sorry! Invalud column selected. It must be on column D",
vbExclamation, "Column Error"
Exit Sub
End If
Select Case Cells(28, 3)
Case 0
ActiveCell.Value = ""
Range(Results_Cell) = ""
Case 1
ActiveCell.Value = ""
Range(Results_Cell) = ""
Case Else
ActiveCell.Value = "Hello" ' Test to see Hello will be place
in active cell.
'ActiveCell.Value = Item(Cells(28, 3) - 1
Debug.Print "Cell(" & ActiveCell.Row & "," & ActiveCell.Column &
")=" _
& Cells(28, 3) & " " & Item(Cells(28, 3) - 1)
End Select
----------- Code End ----------------

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
Convert 29.08 hours (shown in decimal form) to time shown in "hh:m Nila in Florida Excel Worksheet Functions 1 September 14th 08 01:35 AM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
Column of Text Shown = Total Times Shown? philcassell Excel Worksheet Functions 3 July 19th 06 07:24 AM
selected data not shown in graph and axis labels QuantumLeap Charts and Charting in Excel 3 March 1st 06 04:51 PM
Named Ranges shown (or not shown) as blue means what? wdeleo Excel Worksheet Functions 0 July 8th 05 01:40 PM


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

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

About Us

"It's about Microsoft Excel"