Displaying the value of a string

R

Risky Dave

Hi,

I am not a programmer, so apologies if I don't use the correct terms here -
hope it makes sense!

I have a piece of code that uses a string (Dim Storage As String)to store
text concatenated from a series of cells.

What I now want to do is display the concatenated text in a single cell.

I have tried to use:

Range("A1").Value = Storage

But this doesn't actually display the text held in Storage in cell A1. When
I select the cell, it remains blank, but the Formula bar shows that correct
value is associated with the cell.

Any suggestions on how I move the text value of Storage into A1?

This is in Office 2007 under Vista, if that's of any importance.

TIA

Dave
 
G

Gary Keramidas

this works for me

Option Explicit
Sub test()
Dim Storage As String

Storage = Range("b2").Value & Range("c2").Value & Range("d2").Value & _
Range("e2").Value
Range("a1").Value = Storage

End Sub
 
R

Risky Dave

Gary,

Thanks for the prompt respone. Just realised I was being stupid.

The output cell was actually merged with loads of others and the value was
being displayed at the bottom off the cell - below the bottom of the screen!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top