There is ALWAYS a way to do what ever you can dream up
EXCPET maybe (and I say maybe) washing the dishes and
the windows with Excel macros. In fact, there are many ways
to do the same thing.
The question is not CAN it be done but HOW SHOULD it be
done and WHAT EXACTLY you want done.
I suspect that you have decided that the way you have to do this
is to have a macro which does all the work and then you have to
have another macro to delete the original data etc. Maybe if you
explain what data you have and what you want then we can come
up with a technically more appropriate than others.
As far as what I can work out you are asking in this post, you could
just add code to delete the column or to clear the contents. Another
option would be to put the results in cols A to J and then clear the
contents of the remaining cells in col A at the end of the block - that
is cells A101:A1000 in your original example.
What you are trying to do with your BoxNo macro I do not know.
You define userImput and never use it. You use x and do not define it.
You enter the data "=" & x into the range A1:A100 this will put
=1205 (if the user enters 1205 into the input box)
into that range. This macro would do EXACTLY the same thing
Sub BoxNo()
Range("A1:A100").Formula = "=" & InputBox("Enter a Box No")
End Sub
There does not seem to be a point in using a formula there either. This
would look the same to the user.
Sub BoxNo()
Range("A1:A100") = InputBox("Enter a Box No")
End Sub
and the cells would contain
1205 (if the user enters 1205 into the input box)
So, what are you trying to do.
Chrissy.
"George Plakas" wrote in message ...
Hi Chrissy,
That worked fine, Thank You for you help.
Just quickly, is there a way to delete the contents in Column A as the
values moves accross to columns B-K. I know that if I run the following
macro it will replace whatever is in Column A for me with the value I
enter through the dialog box.
What I was wondering is, that I will not always have 100 rows, so is
there a way you can determine how many rows have been populated once all
values move from Column A, so when I enter the box no, it only populates
the rows (In Column A) that have the L0*.* value in columns B-K.
Any help would be appreciated and once again Thank You.
Sub BoxNo()
Dim userInput As Variant
x = InputBox("Enter a Box No") ' Enter, e.g., 1205
Range("A1:A100").Formula = "=" & x & ""
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!