Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Problem entering data in hidden cell, via macro

I have used InputBox to enter data in a visible cell without a problem but it
doesn't work when the cell is in a hidden column. (See code below)

QtyCol = Range("Rpt_Qnty").Column
mnextrow = Cells(Rows.Count, StkCol).End(xlUp).Row + 1
ip = InputBox("Enter Quantity", "Quantity")
Cells(mnextrow, QtyCol).Value = ip

How can I use similar code to enter a value into a cell in a hidden column?
Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Problem entering data in hidden cell, via macro

First, what exactly does "doesn't work" mean? Do you get a run-time
error? Is the wrong/no value assigned? Do you get a crash?

Are the cells or worksheet protected? Validation set?

Simply hiding the column shouldn't prevent entry.



In article ,
Dave wrote:

I have used InputBox to enter data in a visible cell without a problem but it
doesn't work when the cell is in a hidden column. (See code below)

QtyCol = Range("Rpt_Qnty").Column
mnextrow = Cells(Rows.Count, StkCol).End(xlUp).Row + 1
ip = InputBox("Enter Quantity", "Quantity")
Cells(mnextrow, QtyCol).Value = ip

How can I use similar code to enter a value into a cell in a hidden column?
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Problem entering data in hidden cell, via macro

I don't see a problem with it. Are you sure you are using the right column
to get the last row value:

mnextrow = Cells(Rows.Count, StkCol).End(xlUp).Row + 1


does the value of StkCol check the right column.

concept tested in xl2003
--
Regards,
Tom Ogilvy





"Dave" wrote:

I have used InputBox to enter data in a visible cell without a problem but it
doesn't work when the cell is in a hidden column. (See code below)

QtyCol = Range("Rpt_Qnty").Column
mnextrow = Cells(Rows.Count, StkCol).End(xlUp).Row + 1
ip = InputBox("Enter Quantity", "Quantity")
Cells(mnextrow, QtyCol).Value = ip

How can I use similar code to enter a value into a cell in a hidden column?
Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Problem entering data in hidden cell, via macro

I needed to modify StkCol to get the right column.
Thanks very much.

"Tom Ogilvy" wrote:

I don't see a problem with it. Are you sure you are using the right column
to get the last row value:

mnextrow = Cells(Rows.Count, StkCol).End(xlUp).Row + 1


does the value of StkCol check the right column.

concept tested in xl2003
--
Regards,
Tom Ogilvy





"Dave" wrote:

I have used InputBox to enter data in a visible cell without a problem but it
doesn't work when the cell is in a hidden column. (See code below)

QtyCol = Range("Rpt_Qnty").Column
mnextrow = Cells(Rows.Count, StkCol).End(xlUp).Row + 1
ip = InputBox("Enter Quantity", "Quantity")
Cells(mnextrow, QtyCol).Value = ip

How can I use similar code to enter a value into a cell in a hidden column?
Thanks.

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
Entering Formula - Cannot select cell as it is hidden by formula Jim Excel Worksheet Functions 0 March 25th 10 07:22 AM
How to make a macro or function run after entering data in a cell? Bruce[_2_] Excel Worksheet Functions 1 May 22nd 07 02:42 AM
Hidden cell problem kanuvas[_11_] Excel Programming 2 November 14th 05 02:58 PM
Macro entering data into a protected Cell?? [email protected] Excel Discussion (Misc queries) 1 July 13th 05 10:30 AM
macro for "entering data" Jolly Rogers Excel Worksheet Functions 4 February 19th 05 08:22 PM


All times are GMT +1. The time now is 06:10 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"