Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Edit Cells while Macro is Paused at Message Box

Is there a way to edit cells while macro is paused at message box? I
have a spreadsheet that uses autofilters. Currently I am able to use a
macro to cycle through one of the Autofilters to print unique data. I
would like to now Using VBA cycle through one autofilter and come to a
message box. Once at the message box I would like it to stay active
while I edit a few of the filtered cells. Then I would like to hit the
Messagebox's OK button to go to the next autofiltered result and do
the same thing.

If that can't be done, Can the following be done instead?

Sorry that the subject is vague but, I was wondering if the following
is possible. I have a spreadsheet that I maintain that holds a years
worth of data. It is very similar to the following:

Name QTY Item Status
Name, one 1 Item one
Name, two 2 Item one
Name, three 1 Item two
Name, four 2 Item one


What I would like to be able to do is to count the items that have
come in and place that figure into an input box. And then mark that
particular amount as being received.


So let's say that 1 item one has come in. I would like to put
received
in the corresponding Status cell. It would get tricky if only 3 Item
ones came in. I would like to based on a total in the qty column
place
received in the corresponding cells as shown below:


Name QTY Item Status
Name, one 1 Item one Received
Name, two 2 Item one Recieved
Name, three 1 Item two
Name, four 2 Item one


Is there a way to do this via VBA? One more note is that I am using
autofilters.


If there is a way to do this I would greatly appreciate the
assistance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Edit Cells while Macro is Paused at Message Box

Part one is not practical with a Message Box.

In part two, you could probably write some code to use an input box and
update the status of Items that you find needing it during your edit. It
would not be automatic. You would have to have a separate macro to run the
updates but you could Identify those needing updating with the edits and then
start the update macro to complete the task.

"Magoo" wrote:

Is there a way to edit cells while macro is paused at message box? I
have a spreadsheet that uses autofilters. Currently I am able to use a
macro to cycle through one of the Autofilters to print unique data. I
would like to now Using VBA cycle through one autofilter and come to a
message box. Once at the message box I would like it to stay active
while I edit a few of the filtered cells. Then I would like to hit the
Messagebox's OK button to go to the next autofiltered result and do
the same thing.

If that can't be done, Can the following be done instead?

Sorry that the subject is vague but, I was wondering if the following
is possible. I have a spreadsheet that I maintain that holds a years
worth of data. It is very similar to the following:

Name QTY Item Status
Name, one 1 Item one
Name, two 2 Item one
Name, three 1 Item two
Name, four 2 Item one


What I would like to be able to do is to count the items that have
come in and place that figure into an input box. And then mark that
particular amount as being received.


So let's say that 1 item one has come in. I would like to put
received
in the corresponding Status cell. It would get tricky if only 3 Item
ones came in. I would like to based on a total in the qty column
place
received in the corresponding cells as shown below:


Name QTY Item Status
Name, one 1 Item one Received
Name, two 2 Item one Recieved
Name, three 1 Item two
Name, four 2 Item one


Is there a way to do this via VBA? One more note is that I am using
autofilters.


If there is a way to do this I would greatly appreciate the
assistance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Edit Cells while Macro is Paused at Message Box

On Feb 25, 5:20*pm, JLGWhiz wrote:
Part one is not practical with a Message Box.

In part two, you could probably write some code to use an input box and
update the status of Items that you find needing it during your edit. *It
would not be automatic. *You would have to have a separate macro to run the
updates but you could Identify those needing updating with the edits and then
start the update macro to complete the task.



Could you provide an example?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Edit Cells while Macro is Paused at Message Box

This is an over simplified example. You would select the cell to be revised
and
then trigger the macro.

Sub fixit()
newData = InputBox("Enter corrective data", "CORRECTION")
Selection.Value = newData
End Sub

The example is merely to illustrate how to replace data in a cell using
code. If you incorporated this principle into a macro that performs an edit
to find discrepant items then it would be useful.

"Magoo" wrote:

On Feb 25, 5:20 pm, JLGWhiz wrote:
Part one is not practical with a Message Box.

In part two, you could probably write some code to use an input box and
update the status of Items that you find needing it during your edit. It
would not be automatic. You would have to have a separate macro to run the
updates but you could Identify those needing updating with the edits and then
start the update macro to complete the task.



Could you provide an example?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Edit Cells while Macro is Paused at Message Box

Would it be possible to use the input box to do the cell selection?
For example could I use it to pick c1 through c3? and then put the
update in those selections?

If not is it possible to select cells b1 through b4 (cells that
contain amounts) and then put something like received in the
corresponding c1 through c4 cells? I am trying to find a way to
automate this very time consuming inventory task. See wishful example
below:

I would like to Highlight the cells that have the amounts 1 and 4 in
them and run the macro/vba code that would fill in the corresponding
cells.

Amounts Status
1 Received
4 Received
6
7

Highlighting them allows me to see the total in the Sum Area of Excel.
Once I have selected the amount of Items that I know have come in, I
would activate the Macro.
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
Can a macro be paused to allow input, then continue? Rufushenry Excel Worksheet Functions 2 December 31st 09 07:01 PM
How to use macro to edit data in Excel cells Annamalai Excel Discussion (Misc queries) 11 September 21st 06 07:44 AM
Macro to edit cells esskaykay[_3_] Excel Programming 1 August 10th 06 12:52 AM
Macro to edit cells Dean[_8_] Excel Programming 3 July 21st 06 07:18 AM
How do Macro to EDIT cells? George[_23_] Excel Programming 1 September 27th 04 02:35 PM


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