LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Help with Grabbing Cell Value from Range

This is the code I have:

' Grab the database name
Dim strDb As Range
Set strDb = Worksheets("Dashboard").Range("C2")
Dim strDBString As String
Set strDBString = strDb.Text

The range is assigned without a problem; however, extracting the actual text
value seems never to work. Can anyone clarify exactly how this should happen?

My underlying motivation is to pull a cell value in VBA, and then use that
in a SQL query within VBA as well.
 
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
Keeps grabbing more than one cell/column confused Excel Worksheet Functions 1 March 11th 09 03:42 PM
Grabbing Formula Information from Another Cell RJB Excel Discussion (Misc queries) 7 September 13th 08 06:03 PM
Grabbing data from a specific cell *Kenneth* Excel Worksheet Functions 2 March 18th 08 10:31 PM
Grabbing text from just part of a cell Mary T[_2_] Excel Programming 2 January 5th 06 07:01 PM
Grabbing the last Non-empty cell in a range Arlen Excel Discussion (Misc queries) 2 January 22nd 05 05:15 PM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"