我见过this advice,但仍然遇到问题。 点4是模棱两可的。是在一行上还是在另一行上,我看到another place对该行的格式进行了不同的设置。
没有,我将无法运行Hello World:
'Version 1: using single argument GroupNumber
Option Explicit
'************************************************************************
Sub UpdateAllGroups()
Dim StartTime As Double
Dim MinutesElapsed As String
StartTime = Timer
Call UpdateGroup(1)
Call UpdateGroup(2)
MinutesElapsed = Format((Timer - StartTime) / 86400, "hh:mm:ss")
MsgBox "All Updates is done in " & MinutesElapsed, vbInformation, "Message"
End Sub
'************************************************************************
Private Sub UpdateGroup(ByVal GroupNumber As Long)
'DEFINITIONS
Dim fPath, ThisGroupWb, ReportR2ob, ReportR1vo, ReportR2vo As String
Dim WbReport, WbGroup As Workbook
Dim sh_Dash, sh_NewR2ob, sh_NewR1vo, sh_NewR2vo, sh_Time As Worksheet
fPath = ThisWorkbook.Path
If Right(fPath, 1) = "\" Then
fPath = Left(fPath, Len(fPath) - 1)
End If
'Note that path is composed using supplied argument:
Set WbGroup = Workbooks.Open(ThisWorkbook.Path & "\Group" & GroupNumber & "_(M).xlsm")
With WbGroup
Set sh_Dash = .Worksheets("Dash")
Set sh_NewR2ob = .Worksheets("NewR2ob")
Set sh_NewR1vo = .Worksheets("NewR1vo")
Set sh_NewR2vo = .Worksheets("NewR2vo")
Set sh_Time = .Worksheets("Time")
End With
'Same here:
ThisGroupWb = "Group" & GroupNumber & "_(M).xlsm" 'must be changed in each UpdateGroup-sub
ReportR2ob = "R2ob - Group" & GroupNumber & ".xls" 'must be changed in each UpdateGroup-sub
ReportR1vo = "R1vo - Group" & GroupNumber & ".xls" 'must be changed in each UpdateGroup-sub
ReportR2vo = "R2vo - Group" & GroupNumber & ".xls" 'must be changed in each UpdateGroup-sub
'NEW REPORTS
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set WbReport = Workbooks.Open(fPath & "\R2ob\" & ReportR2ob)
WbReport.Sheets(1).Cells.Copy sh_NewR2ob.Range("A1")
WbReport.Close False
Set WbReport = Workbooks.Open(fPath & "\R1vo\" & ReportR1vo)
WbReport.Sheets(1).Cells.Copy sh_NewR2vo.Range("A1")
WbReport.Close False
Set WbReport = Workbooks.Open(fPath & "\R2vo\" & ReportR2vo)
WbReport.Sheets(1).Cells.Copy sh_NewR1vo.Range("A1")
WbReport.Close False
'STORE AND CLOSE GROUP-WB
Application.Goto sh_Dash.Range("A1"), True
WbGroup.Save
WbGroup.Close False
End Sub
如果有人可以说明如何配置JFX11,那么我对这个IDE和Java还是陌生的,我敢肯定我不会是最后一个得到帮助的人。 tku