New to programming Excel from VB 2005

S

Stephen Plotnick

I just started a new project and with lots of reading on internet and some
help from another newsgroup I feel I'm getting the hang of this.

My question is I can not find a list of all the commands available within VB
for working with excel spreadsheets. I'm using Excel 2007 and am able to
take text files and parse fields to put into individual cells. I am able to
save the spreadsheet and even send the spreadsheet via outlook.

Is there any books or link to webpage to help with the available commands?

THanks,
Steve
 
S

Stephen Plotnick

Tom,

THanks; now here is my frustration.

When I started VB programming (COBOL programmer forever) the help via google
and books made the learning curve easier.

Now I'm trying to create a spreadsheet from VB and simple things are
impossible to find. I did find the object you were talking about and can see
all these functions but how am I to know what does what?

Here is some code I wrote to build cells in a spreadsheet. THe building of
the cells works but the hide row does not. I'm probably not even using the
correct command to hide a row. In my program I want to hide row 4.

osheet.Range(MultiLetter & "4").Value = Mid(line, dept_no *
32 + 1, 32).ToString
osheet.Range(MultiLetter & "4").EntireColumn.AutoFit()
osheet.Range(MultiLetter & "5").Value = Mid(line, dept_no *
32 + 1, 32).ToString
osheet.Range(MultiLetter & "5").EntireColumn.AutoFit()
End If
Next dept_no

osheet.Rows.Hidden(4) = True

Sorry about the frustration. I just wish there was a book that had all the
command and what they did along with their syntax.

So you don't think I'm nuts in the example above.. THere is data I build in
row three that I'm going to want to use the new conditional formatting. I
want an up arrow or down arrow in row three based on the value going down
looking at row 5. I'm cheating by putting the value in row 5 also in row 4
and subsequently hiding row 4. This way the user will only see on arrow in
row three and the one in 4 is hidden (that shows the other arrow).

Thanks,
Steve
 
S

Stephen Plotnick

I figured this with dumb luck:)

osheet.Rows("1").RowHeight = 40
osheet.Columns("A").ColumnWidth = 26
osheet.Range("B:ALN").ColumnWidth = 15
osheet.Range("A1:AZ1").WrapText = True
osheet.Rows("4").Hidden = True

Now to figure the conditional formatting in Excel 2007
 
T

Tom Ogilvy

in case you are unaware, there is a macro recorder in Excel. You can turn
it on and apply the conditional formatting manually, then turn off the macro
recorder and look at what is recorded.

It will usually do

Range("A1").Select
Selection.Validata . . .

because that is what you physically did. You can eliminate the paired
select selection. Just use it to get some insight into the syntax and
objects/arguments involved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel using VB - save problem 6
Excel VB application 4
Excel/VB Job 2
VB macros in new Excel 24
Programming Solver 1
Convert from vba to vb? 8
VB Generated Hyperlinks 1
New to Excel Programming 3

Top