PC Review


Reply
Thread Tools Rate Thread

Displaying the value of a string

 
 
Risky Dave
Guest
Posts: n/a
 
      9th Aug 2008
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
 
Reply With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      9th Aug 2008
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

--


Gary


"Risky Dave" <(E-Mail Removed)> wrote in message
news:208E0944-20E7-42FA-B192-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Risky Dave
Guest
Posts: n/a
 
      9th Aug 2008
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!

"Gary Keramidas" wrote:

> 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
>
> --
>
>
> Gary
>
>
> "Risky Dave" <(E-Mail Removed)> wrote in message
> news:208E0944-20E7-42FA-B192-(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Displaying a string Mark Rae Microsoft C# .NET 0 22nd Dec 2006 04:35 PM
Re: Displaying a string Jianwei Sun Microsoft C# .NET 0 22nd Dec 2006 04:29 PM
Displaying a string var in the .aspx page mazdotnet Microsoft ASP .NET 2 8th May 2006 02:51 PM
Displaying Decimals as a string michael_quinlivan@hotmail.com Microsoft Dot NET Framework 1 1st Jul 2005 06:58 AM
Displaying a help- string in the status bar Hinnerk Feldwisch Microsoft Dot NET Framework Forms 5 19th Sep 2003 08:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:53 PM.