Wow! Thanks it works great now, you saved my day. Noticed that this seems to be a common problem when programming against Excel. The confusing part is that intellisense is lost for some properties which makes you think it's not going to work.
So does this ghost excel.exe as well?
xls.Range(startCell, endCell).Select
With Selection.Interior
.ColorIndex = GetColor(rsPeriod!Category)
End With
With...
Yes that what I'm after. Copy and pasted part of the vba code produced by Excel macro and it worked as well.
Set xlWks = xlWrkbk.Worksheets.Add(Before:=Sheets(2))
xlWks.Name = "Data"
xlWks.Range("A1").Select
xlApp.ActiveCell = "testing"
xlApp.Sheets(1).Activate
Tomorrow is...
Hi!
I have a working function that produces a graph on one worksheet and the data is placed on another worksheet. Now I want to add a third worksheet. I'm confused by the syntax..
I have a workbookobject called xlWrkbk and I have put a Dim xlWks as Excel.Worksheet on the top
Set xlWks =...
I solved it :-) I found out that Excel Offset.
firstCell = "$D$7"
I have a another loop around all this..
Do While Not rsPeriod.EOF
startDate = rsPeriod!start
endDate = rsPeriod!end
If startDate < CDate("1/1/2008") Then
noOfMonths = DateDiff("m", CDate("1/1/2008")...
Hmm no I'm not always starting on D7 and the worksheet spans to column DG :-) which is 2016. Yeah planning ahead..
My friend said that in Excel you can translate the letter in the column to a number, have you heard of that?
Ah I'm painting horizontally :-)
numberOfMonths = DateDiff bla bla
wks.Range("D7:" & column(?)& "7").select
D4 is jan-2008 then each column is a month, so 1/1/2008 to 4/31/2008 is D7 to G7. I know the row index all the time because I loop the recordset.
Do you see my "problem"?
But how do I use a counter on the columns, the letters? I have a recordset which gives me a resultset of the edcuational periods for batallions, platoons etc. start date and end date. I need to count how many months in each period, set starting point for selection and end point for selection...
Hi!
I create an Excelfile from Access, no problem. My knowledge about Excelprogramming isn't the best.
I have a starting cell, column 4 (D) and starting row 7. I want to select d7 to j7 and make it green. I have quite many columns from D to DG. I have found that I can use...
Exactly. But I solved it :-) Now I just have to put it in an array. Presentation is due tomorrow, now I have the Excel part left.
If Not rs.EOF Then
' --- Number of total rows
vRowCount = rs.GetRows
rowCount = UBound(vRowCount)...
Let's say my resultset of my search is 6 rows and search is from 1/1/2008 to 12/31/2008 the result I want would look like this:
1 2 2 3 3 3 0 0 6 6 4 4
6 6 6 6 6 6 6 6 6 6 6 6
The period is 12 months, for january only 1 Bat is active in education, february 2 Bats are active and so on. Six is...
Hi!
I'm stuck. Short description of project. I have a table with filled with batallions (yep Army stuff) and their educational periods. Example:
Name StartDate EndDate
Bat1 1/1/2008 12/31/2008
Bat2 1/1/2007 6/30/2008
Bat3 7/1/2008 1/1/2009
Now I want to search between 1/1/2008 and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.