|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Excel workseet in vb
I am a beginner to programming, but i generally know the basics and i can program most things. However i do not know how to use a worksheet in visual basic. I do not want to have to use the excel application.
I just want to know how to reference a cell. I am using Vb6 and everything i have seen does not work, i have tried: Worksheet.("sheet1").range(1,1) sheet1.cells(1,1) cells(1,1) These are the 3 i have seen from searching the web, and nothing seems to work, if someone can just tell me, for example, how to put 1 into any cell i should be able to work the rest out myself Thanks Chris |
|
#2
|
|||
|
|||
|
Excell refers to cells two ways.
"Range" uses the A1 approach where "A" is the column and "1" is the row. So Range("B2") .value = 1 would put the number one in cell B2. The other way is by using Cells. Which refers to both the row and column by number. Cells (6,4).value = 1 would put the number one in row 6 column 4 |
|
#3
|
||||
|
||||
|
depending on what you are trying to do, I usually just reference the entire excel method structure. For example, xlapp.cells(1,1) = cstr("Whatchagonnado"), or xlapp.range("A1","B1"). I have written a short function that takes a known value, such as adors.recordcount, and determines the appropriate hex-based cell number for each item... what are you trying to do in excel?
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Excel workseet in vb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|