•
•
•
•
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:
Rep Power: 4
Solved Threads: 2
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 ?
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 ?
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Similar Threads
- Open Excel Sheet in Vb.net (VB.NET)
- To Fetch EXCEL sheet values thro' ASP page. (Existing Scripts)
- Retriving data from excel sheet into an asp page (ASP)
- Excel Form - For/Next - Naming Convention Problem (Visual Basic 4 / 5 / 6)
- excel, dynamic name range through web link (Windows Software)
- VBA Date Format (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Another problem.
- Next Thread: Need SQL Help (VB6 and Access)



Threaded Mode