Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"The specified dimension is not valid for the current chart type" error. I
can't get rid of this eror even with 2 "On Error" Statements at the bottome of the code where I suspect the problem to be. Private Sub cmdgetBO_Data_Click() Dim f, ws As Worksheet, Msg Dim BO_Datafile_Name As String, BOReport_lastColumn As String Dim BOReport_lastRow As Integer, BOPos As Integer Dim BOReportWS As Worksheet Dim rngBOReport As Range, c As Range With Application .ScreenUpdating = True .Calculation = xlCalculationManual .DisplayAlerts = False End With '""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""' '" THIS SECTION OF CODE RETRIVES THE BO FILES FROM THE HARD DRIVE "' f = Application.GetOpenFilename("Excel Files (*.xls),*.xls") '""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""' '"" THIS SECTION OF CODE OPENS THE BO FILES FROM THE HARD DRIVE ""' '""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""' If f < "" Then Workbooks.Open filename:=f, UpdateLinks:=0, ReadOnly:=True BO_Datafile_Name = ActiveWorkbook.Name Else Unload Me Worksheets("BO Download").Visible = True Range("A4").Select Exit Sub End If '""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""' '"" THIS SECTION OF CODE COPIES THE BO SHEET FROM THE BO FILE ""' '"" AND PASTE IT INTO THE SUMMARY REPORT FILE ""' '""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""' Workbooks(BO_Datafile_Name).Sheets(1).Select Workbooks(BO_Datafile_Name).Sheets(1).Copy Befo=ThisWorkbook.ActiveSheet '"" CLOSE THE BO DOWNLOAD DATA FILE ""' Workbooks(BO_Datafile_Name).Activate Workbooks(BO_Datafile_Name).Close Set BOReportWS = ThisWorkbook.Worksheets("Report 1") BOReportWS.Activate BOReport_lastRow = ActiveSheet.UsedRange.Rows.Count BOReportWS.Range("B5:AX" & BOReport_lastRow).Copy ThisWorkbook.Worksheets("BO Download").Select Range("A4").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False BOReportWS.Select BOReportWS.Delete Application.Calculate With Worksheets("Completions Summary").Cells .Copy .PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False End With Range("A4").Select Worksheets("BO Download").Select Worksheets("BO Download").Delete Worksheets("Completions Summary").Select Range("B4").Select On Error GoTo 0 On Error Resume Next Dim filename As String filename = Mid(ActiveWorkbook.Name, 1, Len(ActiveWorkbook.Name) - 4) ActiveWorkbook.SaveAs filename & "_" & Format(Date, "mmmdd_yy") & ".xls" Application.Calculation = xlCalculationAutomatic Application.DisplayAlerts = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Range Probelm PLEASE ! | Excel Programming | |||
Probelm with macro | Excel Worksheet Functions | |||
FileCopy Probelm | Excel Programming | |||
Hyperlink probelm | Excel Programming | |||
Hyperlink probelm | Excel Worksheet Functions |