All,
I have created a database to track our projects. Each project could be a stand alone project or a child of a parent project. Each project can have many task to track those I have an excel workbook with one sheet for each project. I would like to take all the children task list and roll...
OK that fixed that . . .
[Code VBA\With .Worksheets(1).Range(Cells(6, 2), Cells(6, 10))</code>
I am getting a runtime 1004 Method 'Cells' of Object '_Global' failed. We fix one and break another one . . . .
You told me that before, how did I miss that!!! Thank you it works beautiful. Now I am going to make another one that will add a tab for each employee and the projects they are working on and have a master. That will be my new challenge.
THANK YOU AGAIN!!
OK guys thank you for all your help I really appriciate it.
I have modified the function with your suggestions, but I am getting hung up on a section and I am not sure if is my placement of With and End With.
I am getting Object does not support this property or method.
The line is pretty...
OK that fixed that . . .
[Code VBA\With .Worksheets(1).Range(Cells(6, 2), Cells(6, 10))</code>
I am getting a runtime 1004 Method 'Cells' of Object '_Global' failed. We fix one and break another one . . . .
OK that fixed that . . .
[Code VBA\With .Worksheets(1).Range(Cells(6, 2), Cells(6, 10))</code>
I am getting a runtime 1004 Method 'Cells' of Object '_Global' failed. We fix one and break another one . . . .
Skip thanks for all your help on this.
I changed this to
With .Worksheets(1)
.Cells(7, 3).Select
ActiveWindow.FreezePanes = True << Runtime 91
.Rows("6:6").RowHeight = 33.75
.Columns("A:A").ColumnWidth = 3
.Columns("B:B").ColumnWidth =...
I think I am getting this now.
So for this section I have a lot of With/End With Do I need to change those from this . .
With .Worksheets(1).Cells(7, 3)
ActiveWindow.FreezePanes = True
End With
Rows("6:6").RowHeight = 33.75
Columns("A:A").ColumnWidth = 3...
OK so then would I convert this
.Worksheets(1).Range(Cells(6, 2), Cells(6, 10)).Select
Selection.Font.Bold = True
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
to this
With .Worksheets(1).Range(Cells(6, 2)...
OK I did all of that now I am getting a 424 Runtime, Object Required.
Here is a the first half where it breaks.
Public Function CreateExcel(Optional myEmpoyeeNumber As Integer)
Dim xlApp As Object
Dim myMessage, myStyle, myTitle, myResult
Dim mySQL, myDB, myRS1, myRS2
Dim myColorIndex As...
I am not sure what you mean my column() reference is to nothing. I am setting the column width at that point. Like I said I mostly work in Access VBA. I created most of this by recording a macro in Excel and then reviewing the source in Excel and adding it to my Access Code. Thanks . . . ...
All,
I have a Public Function in Access that will read from my tables and create a formatted Excel Spreadsheet. It works most of the time, other times I get errors at various spots Object variable or With block variable not set, Error 91, Application-defined or Object-defined error, Error...
I think I had the same error. Check out this to see if it fixes your error.
http://support.microsoft.com/kb/825765
http://groups.google.com/group/microsoft.public.word.mailmerge.fields/browse_thread/thread/df0ce0405aef897d/df2c33bdcfe207a6#df2c33bdcfe207a6
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.