User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 396,885 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,305 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 17239 | Replies: 2
Join Date: Aug 2005
Location: Seaham, UK
Posts: 182
Reputation: bops is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
bops bops is offline Offline
Junior Poster

VBA - Excel - sheet,range lookup with variables

  #1  
Sep 26th, 2005
hi everyone, I am doing a project for college, which involves programming using VBA in Excel. I have most of it sorted and i am having trouble on this 1 part. I need to find out how to use variables to access a sheet and range within the spreadsheet

variable1 = sheets("sheet").range("range1")
variable2 = sheets("sheet").range("range2")
txtBox = sheets(variable1).range("variable2")

this would look in "sheets" find "range1" which has the name of another sheet. then it would look in "range2" which has the name of a range, then these are combined looking in the sheet and range given by values in the spreadsheet.

this seems to be erroneous, does anyone have any suggestions ?
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 4:03 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC