View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Value NOT adding 1 ??

So instead of

Range("A1").Value = TextBox1.Value

do

Range("A1").Value = Application.Max(Sheets("Data").Range("A:A")) + 1


Reminds me of the old joke

Patient: Doc, it hurts when I do this!
Doctor: Don't do that.

But maybe I am missing something <g

--
Regards,
Tom Ogilvy



"Corey" wrote in message
...
I am using code like :
Range("A1").Value = TextBox1.Value
"Tom Ogilvy" wrote in message
...
How are you putting the value in the cell. If by a link, do it with code
instead.

--
Regards,
Tom Ogilvy


"Corey" wrote in message
...
Found out why.
I was adding the "A" and i have the Data Adding it also.

Now i need to remove the "A" when it is placed in the Data Sheet leaving
ONLY the Numerical value.
EG.
"A 1234" to be "1234" how do i do that ?

"Corey" wrote in message
...
Thanks Tom, but i seem to STILL get ONLY the MAX value.
If i do this:
TextBox1.Value = "A " & (Application.Max(Sheets("Data").Range("A:A")) +
2)
then i get the MAX + 1 ????

"Tom Ogilvy" wrote in message
...
try
TextBox1.Value = "A " & (Application.Max(Sheets("Data").Range("A:A")) +
1)

--
Regards,
Tom Ogilvy



"Corey" wrote in message
...
TextBox1.Value = "A " & Application.Max(Sheets("Data").Range("A:A")) + 1

The result of the above is EQUAL to the MAX value and NOT (+1) Why?

I get "A 3869" instead of "A3870".

Corey....