12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210 |
- Imports Microsoft.Office.Interop.Excel.XlUnderlineStyle
- Imports Microsoft.Office.Interop.Excel.Constants
- Imports Microsoft.Office.Interop.Excel.XlBordersIndex
- Imports Microsoft.Office.Interop.Excel.XlLineStyle
- Imports Microsoft.Office.Interop.Excel.XlBorderWeight
- Imports Microsoft.Office.Interop.Excel.XlThemeFont
- Imports Microsoft.Office.Interop.Excel.XlThemeColor
- Imports Microsoft.Office.Interop.Excel.XlWindowState
- Imports Microsoft.Office.Interop.Excel
- Imports PdfSharp.Pdf
- Imports PdfSharp.Pdf.IO
- Imports System.IO
- Public Class 合約請款單
- ReadOnly ds1, ds2, ds6, ds7, ds8, ds9, ds10, ds11, ds15 As New DataSet
- Dim ESTR, 對話框(1) As String
- Dim EDR, 選擇項, DF, FG, GH As Integer
- Dim xlApp As Application : Dim xlBook As Workbook : Dim xlSheet As Worksheet
- Dim OldX, OldY As Long
- Dim drag, 放大 As Boolean
- Private Sub Set_合約清單()
- 合約_dgv.DataSource = Nothing : ds6.Clear()
- 合約_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 合約_dgv.ColumnHeadersHeight = 25 : 合約_dgv.AllowUserToAddRows = False
- PA46 = 合約編號1_cb.Text : PA47 = 工程期1_ch.Text : PA = 關鍵字搜尋_tb.Text
- SQL_合約清單_請款用()
- da.Fill(ds6) : 合約_dgv.DataSource = ds6.Tables(0) : conn.Close()
- 合約_dgv.Columns(0).FillWeight = 160 : 合約_dgv.Columns(1).Visible = False : 合約_dgv.Columns(2).Visible = False : 合約_dgv.Columns(3).Visible = False
- 合約_dgv.Columns(4).Visible = False : 合約_dgv.Columns(5).Visible = False : 合約_dgv.Columns(6).Visible = False : 合約_dgv.Columns(7).Visible = False
- 合約_dgv.Columns(8).Visible = False : 合約_dgv.Columns(9).Visible = False : 合約_dgv.Columns(10).Visible = False : 合約_dgv.Columns(11).Visible = False
- 合約_dgv.Columns(12).Visible = False : 合約_dgv.Columns(13).Visible = False : 合約_dgv.Columns(14).Visible = False : 合約_dgv.Columns(15).Visible = False
- 合約_dgv.Columns(16).Visible = False : 合約_dgv.Columns(17).Visible = False : 合約_dgv.Columns(18).Visible = False : 合約_dgv.Columns(19).Visible = False
- 合約_dgv.Columns(20).Visible = False : 合約_dgv.Columns(21).Visible = False : 合約_dgv.Columns(22).Visible = False : 合約_dgv.Columns(23).Visible = False
- 合約_dgv.Columns(24).FillWeight = 100 : 合約_dgv.Columns(25).Visible = False : 合約_dgv.Columns(26).Visible = False : 合約_dgv.Columns(27).Visible = False
- 合約_dgv.Columns(28).Visible = False : 合約_dgv.Columns(29).Visible = False : 合約_dgv.Columns(30).Visible = False : 合約_dgv.Columns(表頭(2)).FillWeight = 300
- If 放大 = True Then
- 合約_dgv.Columns(表頭(2)).Visible = True
- Else
- 合約_dgv.Columns(表頭(2)).Visible = False
- End If
- End Sub
- Private Sub Set_附錄清單()
- 合約附錄_dgv.DataSource = Nothing : ds1.Clear()
- 合約附錄_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 合約附錄_dgv.ColumnHeadersHeight = 25 : 合約附錄_dgv.AllowUserToAddRows = False
- SQL_附錄合約_清單查詢1()
- da.Fill(ds1) : 合約附錄_dgv.DataSource = ds1.Tables(0) : conn.Close()
- 合約附錄_dgv.Columns(0).Visible = False : 合約附錄_dgv.Columns(1).FillWeight = 160 : 合約附錄_dgv.Columns(2).Visible = False : 合約附錄_dgv.Columns(3).Visible = False
- 合約附錄_dgv.Columns(4).Visible = False : 合約附錄_dgv.Columns(5).Visible = False : 合約附錄_dgv.Columns(6).Visible = False : 合約附錄_dgv.Columns(7).FillWeight = 70
- End Sub
- Private Sub Set_合約報價總表()
- 報價總表_dgv.DataSource = Nothing : ds15.Clear()
- 報價總表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 報價總表_dgv.ColumnHeadersHeight = 40 : 報價總表_dgv.AllowUserToAddRows = False : 報價總表_dgv.RowTemplate.Height = 45
- 報價總表_dgv.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True
- SQL_合約報價總表()
- da.Fill(ds15) : 報價總表_dgv.DataSource = ds15.Tables(0) : conn.Close()
- 報價總表_dgv.Columns(0).Visible = False : 報價總表_dgv.Columns(8).Visible = False : 報價總表_dgv.Columns(9).Visible = False
- 報價總表_dgv.Columns(0).FillWeight = 50 : 報價總表_dgv.Columns(1).FillWeight = 50 : 報價總表_dgv.Columns(2).FillWeight = 210
- 報價總表_dgv.Columns(3).FillWeight = 50 : 報價總表_dgv.Columns(4).FillWeight = 50 : 報價總表_dgv.Columns(5).FillWeight = 80
- 報價總表_dgv.Columns(6).FillWeight = 80 : 報價總表_dgv.Columns(7).FillWeight = 90
-
- For i As Integer = 4 To 6 : 報價總表_dgv.Columns(i).DefaultCellStyle.Format = "#,##0" : Next
- For i As Integer = 4 To 6 : 報價總表_dgv.Columns(i).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : Next
- For i As Integer = 0 To 7 : 報價總表_dgv.Columns(i).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter : Next
- 報價總表_dgv.Columns(1).ReadOnly = True : 報價總表_dgv.Columns(2).ReadOnly = True : 報價總表_dgv.Columns(6).ReadOnly = True
- 報價總表_dgv.EditMode = DataGridViewEditMode.EditOnEnter
- End Sub
- Private Sub Set_請款清單()
- 請款單_dgv.DataSource = Nothing : ds2.Clear()
- 請款單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 請款單_dgv.ColumnHeadersHeight = 25 : 請款單_dgv.AllowUserToAddRows = False
- SQL_請款單_清單查詢()
- da.Fill(ds2) : 請款單_dgv.DataSource = ds2.Tables(0) : conn.Close()
- 請款單_dgv.Columns(0).Visible = False : 請款單_dgv.Columns(1).FillWeight = 50 : 請款單_dgv.Columns(2).Visible = False : 請款單_dgv.Columns(3).FillWeight = 50
- 請款單_dgv.Columns(4).FillWeight = 100 : 請款單_dgv.Columns(5).FillWeight = 50 : 請款單_dgv.Columns(6).Visible = False : 請款單_dgv.Columns(7).Visible = False
- 請款單_dgv.Columns(8).FillWeight = 100 : 請款單_dgv.Columns(9).FillWeight = 80 : 請款單_dgv.Columns(10).FillWeight = 50
- 請款單_dgv.Columns(3).DefaultCellStyle.Format = "#,##0" : 請款單_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
- 請款單_dgv.Columns(5).DefaultCellStyle.Format = "#,##0" : 請款單_dgv.Columns(8).DefaultCellStyle.Format = "#,##0"
- 請款單_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- 請款單_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- 請款單_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- 請款單_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- If 請款單_dgv.Rows.Count = 0 Then : Label47.Text = "" : Else
- For i As Integer = 0 To 請款單_dgv.Rows.Count - 1
- If i = 請款單_dgv.Rows.Count - 1 Or i = 0 Then : Else
- If 請款單_dgv(表頭(6), i).Value.ToString() = 請款單_dgv(表頭(6), i + 1).Value.ToString() Then : Label47.Text = 對話框(1) : Set_請款清單_1() : Exit Sub : End If
- End If : Label47.Text = 對話框(0)
- Next
- End If : Set_請款清單_1
- End Sub
- Private Sub Set_請款清單_1()
- If Label47.Text = 對話框(1) Then : For i As Integer = 0 To 請款單_dgv.Rows.Count - 1 : 請款單_dgv("分期", i).Value = i + 1 : Next : End If
- End Sub
- Private Sub Set_合約明細1()
- 第1期_dgv.DataSource = Nothing : ds7.Clear()
- 第1期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 第1期_dgv.ColumnHeadersHeight = 25 : 第1期_dgv.AllowUserToAddRows = False
- SQL_合約明細讀取()
- da.Fill(ds7) : 第1期_dgv.DataSource = ds7.Tables(0) : conn.Close()
- 第1期_dgv.Columns(0).Visible = False : 第1期_dgv.Columns(1).Visible = False : 第1期_dgv.Columns(2).FillWeight = 20 : 第1期_dgv.Columns(3).FillWeight = 140
- 第1期_dgv.Columns(4).FillWeight = 20 : 第1期_dgv.Columns(5).FillWeight = 50
- 第1期_dgv.Columns(2).ReadOnly = True : 第1期_dgv.Columns(5).ReadOnly = True
- 第1期_dgv.EditMode = DataGridViewEditMode.EditOnEnter
- 第1期_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 第1期_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 第1期_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
- 第1期_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 第1期_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- End Sub
- Private Sub Set_合約明細2()
- 第2期_dgv.DataSource = Nothing : ds8.Clear()
- 第2期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 第2期_dgv.ColumnHeadersHeight = 25 : 第2期_dgv.AllowUserToAddRows = False
- SQL_合約明細讀取()
- da.Fill(ds8) : 第2期_dgv.DataSource = ds8.Tables(0) : conn.Close()
- 第2期_dgv.Columns(0).Visible = False : 第2期_dgv.Columns(1).Visible = False : 第2期_dgv.Columns(2).FillWeight = 20 : 第2期_dgv.Columns(3).FillWeight = 140
- 第2期_dgv.Columns(4).FillWeight = 20 : 第2期_dgv.Columns(5).FillWeight = 50
- 第2期_dgv.Columns(2).ReadOnly = True : 第2期_dgv.Columns(5).ReadOnly = True
- 第2期_dgv.EditMode = DataGridViewEditMode.EditOnEnter
- 第2期_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 第2期_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 第2期_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
- 第2期_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 第2期_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- End Sub
- Private Sub Set_合約明細3()
- 第3期_dgv.DataSource = Nothing : ds9.Clear()
- 第3期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 第3期_dgv.ColumnHeadersHeight = 25
- 第3期_dgv.AllowUserToAddRows = False
- SQL_合約明細讀取()
- da.Fill(ds9) : 第3期_dgv.DataSource = ds9.Tables(0) : conn.Close()
- 第3期_dgv.Columns(0).Visible = False : 第3期_dgv.Columns(1).Visible = False : 第3期_dgv.Columns(2).FillWeight = 20 : 第3期_dgv.Columns(3).FillWeight = 140
- 第3期_dgv.Columns(4).FillWeight = 20 : 第3期_dgv.Columns(5).FillWeight = 50
- 第3期_dgv.Columns(2).ReadOnly = True : 第3期_dgv.Columns(5).ReadOnly = True
- 第3期_dgv.EditMode = DataGridViewEditMode.EditOnEnter
- 第3期_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 第3期_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 第3期_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
- 第3期_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 第3期_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- End Sub
- Private Sub Set_合約明細4()
- 第4期_dgv.DataSource = Nothing : ds10.Clear()
- 第4期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 第4期_dgv.ColumnHeadersHeight = 25 : 第4期_dgv.AllowUserToAddRows = False
- SQL_合約明細讀取()
- da.Fill(ds10) : 第4期_dgv.DataSource = ds10.Tables(0) : conn.Close()
- 第4期_dgv.Columns(0).Visible = False : 第4期_dgv.Columns(1).Visible = False : 第4期_dgv.Columns(2).FillWeight = 20 : 第4期_dgv.Columns(3).FillWeight = 140
- 第4期_dgv.Columns(4).FillWeight = 20 : 第4期_dgv.Columns(5).FillWeight = 50
- 第4期_dgv.Columns(2).ReadOnly = True : 第4期_dgv.Columns(5).ReadOnly = True
- 第4期_dgv.EditMode = DataGridViewEditMode.EditOnEnter
- 第4期_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 第4期_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 第4期_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
- 第4期_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 第4期_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- End Sub
- Private Sub Set_合約明細5()
- 第5期_dgv.DataSource = Nothing : ds11.Clear()
- 第5期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 第5期_dgv.ColumnHeadersHeight = 25 : 第5期_dgv.AllowUserToAddRows = False
- SQL_合約明細讀取()
- da.Fill(ds11) : 第5期_dgv.DataSource = ds11.Tables(0) : conn.Close()
- 第5期_dgv.Columns(0).Visible = False : 第5期_dgv.Columns(1).Visible = False : 第5期_dgv.Columns(2).FillWeight = 20 : 第5期_dgv.Columns(3).FillWeight = 140
- 第5期_dgv.Columns(4).FillWeight = 20 : 第5期_dgv.Columns(5).FillWeight = 50
- 第5期_dgv.Columns(2).ReadOnly = True : 第5期_dgv.Columns(5).ReadOnly = True
- 第5期_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 第5期_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 第5期_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
- 第5期_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 第5期_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
- End Sub
- Private Sub 甲方條件下拉清單讀取()
- SQL合約條件讀取() : 合約編號1_cb.Items.Clear() : 合約編號1_cb.Items.Add("") : While (dr.Read()) : 合約編號1_cb.Items.Add(dr("約號甲方")) : End While : conn.Close()
- End Sub
- Private Sub 語言轉換讀取()
- If 系統語言 = "繁體中文" Then : 語言 = "CH" : ElseIf 系統語言 = "English" Then : 語言 = "EN" : ElseIf 系統語言 = "Indonesian" Then : 語言 = "IN" : End If
- Me.Text = 系統語言字典("H001-131-" & 語言) : ToolTip1.ToolTipTitle = 系統語言字典("G000-108-" & 語言) : Label7.Text = 系統語言字典("H104-106-" & 語言)
- Label11.Text = 系統語言字典("H110-118-" & 語言) : Label2.Text = 系統語言字典("H501-144-" & 語言) : Label372.Text = 系統語言字典("H112-100-" & 語言)
- Label375.Text = 系統語言字典("G000-215-" & 語言) : Label378.Text = 系統語言字典("G000-216-" & 語言) : CH2.Text = 系統語言字典("H108-101-" & 語言) & "=Rp."
- Label21.Text = 系統語言字典("H108-101-" & 語言) : TabPage5.Text = 系統語言字典("H108-102-" & 語言) : Label390.Text = 系統語言字典("H108-102-" & 語言)
- TabPage6.Text = 系統語言字典("H108-103-" & 語言) : Label389.Text = 系統語言字典("H108-103-" & 語言) : TabPage7.Text = 系統語言字典("H108-104-" & 語言)
- Label388.Text = 系統語言字典("H108-104-" & 語言) : TabPage8.Text = 系統語言字典("H108-105-" & 語言) : Label387.Text = 系統語言字典("H108-105-" & 語言)
- TabPage9.Text = 系統語言字典("H108-106-" & 語言) : Label386.Text = 系統語言字典("H108-106-" & 語言) : 新增資料_bt.Text = 系統語言字典("H104-115-" & 語言)
- 刪除資料_bt.Text = 系統語言字典("H108-107-" & 語言) : Label19.Text = 系統語言字典("H108-108-" & 語言) : Label5.Text = 系統語言字典("H104-105-" & 語言)
- 存檔_tb.Text = 系統語言字典("H108-109-" & 語言)
- Label40.Text = 系統語言字典("H108-112-" & 語言) : Label41.Text = 系統語言字典("H108-113-" & 語言) : Label38.Text = 系統語言字典("H108-114-" & 語言)
- Label43.Text = 系統語言字典("H311-102-" & 語言) : Label45.Text = 系統語言字典("H108-115-" & 語言) : Label44.Text = 系統語言字典("H108-116-" & 語言)
- Label46.Text = 系統語言字典("H108-117-" & 語言) : Label414.Text = 系統語言字典("H303-117-" & 語言) : 主頁_ch.Text = 系統語言字典("H108-118-" & 語言)
- 主頁明細_ch.Text = 系統語言字典("H108-119-" & 語言) : 請款單_ch.Text = 系統語言字典("H108-120-" & 語言) : 報告移交單_ch.Text = 系統語言字典("H108-121-" & 語言)
- 新版_ch.Text = 系統語言字典("H108-122-" & 語言) : 表頭(1) = 系統語言字典("H501-152-" & 語言) : 表頭(2) = 系統語言字典("H112-118-" & 語言)
- 表頭(3) = 系統語言字典("G000-157-" & 語言) : 表頭(4) = 系統語言字典("H104-100-" & 語言) : 表頭(5) = 系統語言字典("H307-106-" & 語言)
- 表頭(6) = 系統語言字典("H108-144-" & 語言) : 表頭(7) = 系統語言字典("H108-114-" & 語言) : 表頭(8) = 系統語言字典("H108-145-" & 語言)
- 表頭(9) = 系統語言字典("H311-102-" & 語言) : 表頭(10) = 系統語言字典("H108-146-" & 語言) : 表頭(11) = 系統語言字典("H108-147-" & 語言)
- 表頭(12) = 系統語言字典("H108-148-" & 語言) : 表頭(13) = 系統語言字典("H903-108-" & 語言) : 表頭(14) = 系統語言字典("H108-114-" & 語言)
- 表頭(15) = 系統語言字典("H204-109-" & 語言) : CH1.Text = 系統語言字典("H108-100-" & 語言) : 對話框(0) = 系統語言字典("H108-149-" & 語言)
- 對話框(1) = 系統語言字典("H108-150-" & 語言)
- End Sub
- Private Sub 合約請款單_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Me.MdiParent = HX_PGS_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
- 風格() : H(108) = True : 介面 = "H108" : 語言轉換讀取() : 顯示說明(999, True)
- 工程款1_nud.Value = 30 : 工程款2_nud.Value = 40 : 工程款3_nud.Value = 20 : 工程款4_nud.Value = 5 : 工程款5_nud.Value = 5 : 視窗2_pl.Visible = False '報告移交單_ch.Enabled = False
- SOP3_P.Image = My.Resources._1_124 : SOP4_P.Image = My.Resources._1_124 : SOP5_P.Image = My.Resources._1_124 : SOP6_P.Image = My.Resources._1_124 : SOP7_P.Image = My.Resources._1_124
- SOP3_P.SizeMode = 4 : SOP4_P.SizeMode = 4 : SOP5_P.SizeMode = 4 : SOP6_P.SizeMode = 4 : SOP7_P.SizeMode = 4 : Label47.Text = ""
- 甲方條件下拉清單讀取() : Set_合約清單() : 合約報價單_Siz()
- End Sub
- Private Sub 合約驗收單_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
- If 待辦進入 <> "" Then : lastFoundRowIndex = -1 : lastFoundColIndex = -1
- 關鍵字搜尋_tb.Text = 待辦進入 : 查詢DGV中的關鍵字_自動(合約_dgv, 關鍵字搜尋_tb) : 選擇項 = lastFoundRowIndex : 合約資料讀取()
- lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 關鍵字搜尋_tb.Text = "" : 待辦進入 = ""
- End If
- End Sub
- Private Sub 合約請款單_Closed(sender As Object, e As EventArgs) Handles MyBase.Closed
- MyMod.虛擬桌面開啟()
- End Sub
- Private Sub 合約報價單_Siz()
- MyMod.清單字體大小調整()
- 合約_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 7.6)
- 合約附錄_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- 請款單_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- 第1期_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- 第2期_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- 第3期_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- 第4期_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- 第5期_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value)
- End Sub
- Private Sub 登入閒置控制_MouseMove(sender As Object, e As EventArgs) Handles MyBase.MouseMove
- timeNow = 0 : HX_PGS_ERP_SYS.Timer1.Enabled = False : HX_PGS_ERP_SYS.Timer1.Enabled = True
- End Sub
- Private Sub 登入閒置控制_KeyPress(sender As Object, e As EventArgs) Handles MyBase.KeyPress
- timeNow = 0 : HX_PGS_ERP_SYS.Timer1.Enabled = False : HX_PGS_ERP_SYS.Timer1.Enabled = True
- End Sub
- Private Sub 語轉扭_bt_Click(sender As Object, e As EventArgs) Handles 語轉扭_bt.Click
- 介面 = "H108" : 語言轉換讀取()
- End Sub
- Private Sub 請款計算()
- BNUD1.Value = 金額1_und.Value : BNUD2.Value = 金額2_und.Value : BNUD3.Value = 金額3_und.Value : BNUD4.Value = 金額4_und.Value : BNUD5.Value = 金額5_und.Value
- ANUD4.Value = 0 : For i As Integer = 0 To 請款單_dgv.Rows.Count - 1 : ANUD4.Value += 請款單_dgv(表頭(10), i).Value.ToString : Next
- ANUD1.Value = NUD3.Value : ANUD3.Value = NUD5.Value : ANUD2.Value = ANUD1.Value + ANUD3.Value : ANUD5.Value = ANUD2.Value - ANUD4.Value
- '----收款累加---------------
- Dim 已收款 As Long = 0
- For DD As Integer = 0 To 1
- For i As Integer = 0 To 請款單_dgv.Rows.Count - 1 : 已收款 += 請款單_dgv(表頭(10), i).Value : Next
- If 已收款 = 0 Then : Else
- If 已收款 = BNUD1.Value Then : BNUD1.Value = 0 : Exit For : ElseIf 已收款 < BNUD1.Value Then : BNUD1.Value = BNUD1.Value - 已收款 : Exit For
- ElseIf 已收款 > BNUD1.Value Then : 已收款 -= BNUD1.Value : BNUD1.Value = 0 : End If
- If 已收款 = BNUD2.Value Then : BNUD2.Value = 0 : Exit For : ElseIf 已收款 < BNUD2.Value Then : BNUD2.Value = BNUD2.Value - 已收款 : Exit For
- ElseIf 已收款 > BNUD2.Value Then : 已收款 -= BNUD2.Value : BNUD2.Value = 0 : End If
- If 已收款 = BNUD3.Value Then : BNUD3.Value = 0 : Exit For : ElseIf 已收款 < BNUD3.Value Then : BNUD3.Value = BNUD3.Value - 已收款 : Exit For
- ElseIf 已收款 > BNUD3.Value Then : 已收款 -= BNUD3.Value : BNUD3.Value = 0 : End If
- If 已收款 = BNUD4.Value Then : BNUD4.Value = 0 : Exit For : ElseIf 已收款 < BNUD4.Value Then : BNUD4.Value = BNUD4.Value - 已收款 : Exit For
- ElseIf 已收款 > BNUD4.Value Then : 已收款 -= BNUD4.Value : BNUD4.Value = 0 : End If
- If 已收款 = BNUD5.Value Then : BNUD5.Value = 0 : Exit For : ElseIf 已收款 < BNUD5.Value Then : BNUD5.Value = BNUD5.Value - 已收款 : Exit For
- ElseIf 已收款 > BNUD5.Value Then : BNUD5.Value = 0 : End If
- End If
- Next
- 'My.Resources._1_123 綠色 My.Resources._1_124 紅色 My.Resources._1_125 橘色
- If 工程款1_nud.Value > 0 And BNUD1.Value > 0 Then : SOP3_P.Image = My.Resources._1_125 : ElseIf 工程款1_nud.Value > 0 And BNUD1.Value = 0 Then : SOP3_P.Image = My.Resources._1_123
- ElseIf 工程款1_nud.Value = 0 And BNUD1.Value = 0 Then : SOP3_P.Image = My.Resources._1_124 : End If : SOP3_P.SizeMode = 4
- If 工程款2_nud.Value > 0 And BNUD2.Value > 0 Then : SOP4_P.Image = My.Resources._1_125 : ElseIf 工程款2_nud.Value > 0 And BNUD2.Value = 0 Then : SOP4_P.Image = My.Resources._1_123
- ElseIf 工程款2_nud.Value = 0 And BNUD2.Value = 0 Then : SOP4_P.Image = My.Resources._1_124 : End If : SOP4_P.SizeMode = 4
- If 工程款3_nud.Value > 0 And BNUD3.Value > 0 Then : SOP5_P.Image = My.Resources._1_125 : ElseIf 工程款3_nud.Value > 0 And BNUD3.Value = 0 Then : SOP5_P.Image = My.Resources._1_123
- ElseIf 工程款3_nud.Value = 0 And BNUD3.Value = 0 Then : SOP5_P.Image = My.Resources._1_124 : End If : SOP5_P.SizeMode = 4
- If 工程款4_nud.Value > 0 And BNUD4.Value > 0 Then : SOP6_P.Image = My.Resources._1_125 : ElseIf 工程款4_nud.Value > 0 And BNUD4.Value = 0 Then : SOP6_P.Image = My.Resources._1_123
- ElseIf 工程款4_nud.Value = 0 And BNUD4.Value = 0 Then : SOP6_P.Image = My.Resources._1_124 : End If : SOP6_P.SizeMode = 4
- If 工程款5_nud.Value > 0 And BNUD5.Value > 0 Then : SOP7_P.Image = My.Resources._1_125 : ElseIf 工程款5_nud.Value > 0 And BNUD5.Value = 0 Then : SOP7_P.Image = My.Resources._1_123
- ElseIf 工程款5_nud.Value = 0 And BNUD5.Value = 0 Then : SOP7_P.Image = My.Resources._1_124 : End If : SOP7_P.SizeMode = 4
-
- PA = 合約編號_tb.Text : PA1 = ANUD3.Value : PA2 = ANUD2.Value : PA3 = ANUD4.Value : PA4 = ANUD5.Value : PA5 = BNUD1.Value : PA6 = BNUD2.Value
- PA7 = BNUD3.Value : PA8 = BNUD4.Value : PA9 = BNUD5.Value : SQL_控制表_請款修改()
- End Sub
- Private Sub 合約_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 合約_dgv.CellClick
- If e.RowIndex = -1 Then : Else : 選擇項 = e.RowIndex : 合約資料讀取() : End If
- End Sub
- Private Sub 合約資料讀取()
- 請款單號_tb.Text = "" : 請款期數_cb.Text = "" : 比例_nud.Value = 0 : 稅金_nud.Value = 0 : 請款金額_nud.Value = 0 : 請款總額_nud.Value = 0 : 付款期限_cb.Text = ""
- 報告移交計算()
-
- If 放大 = True Then : 縮放2_bt.PerformClick() : End If : 合約編號_tb.Text = 合約_dgv(表頭(1), 選擇項).Value.ToString : PA = 合約編號_tb.Text : Set_合約報價總表()
- If 報價總表_dgv.Rows.Count > 0 Then
- For i As Integer = 0 To 報價總表_dgv.Rows.Count - 1
- If 報價總表_dgv.Rows(i).Cells("DESCRIPTION").Value.ToString = "稅金 10% Tax" Then : 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. "
- ElseIf 報價總表_dgv.Rows(i).Cells("DESCRIPTION").Value.ToString = "稅金 11% Tax" Then : 稅額顯示_lb.Text = "PPN 11%稅額 = Rp. " : End If
- If 報價總表_dgv.Rows(i).Cells("DESCRIPTION").Value.ToString = "總計 Grand Total" Then : NUD3.Value = 報價總表_dgv.Rows(i).Cells("AMOUNT (RP)").Value : End If
- Next
- Else : 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " : End If
-
- B09_tb.Text = 合約_dgv("客戶地址", 選擇項).Value.ToString() : B24_tb.Text = "" : B25_tb.Text = "" : B26_tb.Text = ""
- If 合約_dgv("驗收完成日期", 選擇項).Value.ToString() <> "" Then
- DTP1.Value = 合約_dgv("驗收完成日期", 選擇項).Value.ToString() : B44_tb.Text = 合約_dgv.Rows(選擇項).Cells("保固期限").Value.ToString
- Dim 保固日 As String = Strings.Format(DTP1.Value.AddMonths(CInt(合約_dgv.Rows(選擇項).Cells("保固期限").Value.ToString)))
- B24_tb.Text = Strings.Right(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 2)
- B26_tb.Text = Strings.Left(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 4)
- If Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "01" Then : B25_tb.Text = "Jan"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "02" Then : B25_tb.Text = "Feb"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "03" Then : B25_tb.Text = "Ber"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "04" Then : B25_tb.Text = "Apr"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "05" Then : B25_tb.Text = "Mun"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "06" Then : B25_tb.Text = "Jun"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "07" Then : B25_tb.Text = "Jul"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "08" Then : B25_tb.Text = "Agu"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "09" Then : B25_tb.Text = "Sep"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "10" Then : B25_tb.Text = "Okt"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "11" Then : B25_tb.Text = "Nov"
- ElseIf Strings.Mid(Strings.Format(合約_dgv("驗收完成日期", 選擇項).Value.ToString()), 6, 2) = "12" Then : B25_tb.Text = "Des" : End If
- B27_tb.Text = Strings.Right(保固日, 2) : B29_tb.Text = Strings.Left(保固日, 4)
- If Strings.Mid(保固日, 6, 2) = "01" Then : B28_tb.Text = "Jan" : ElseIf Strings.Mid(保固日, 6, 2) = "02" Then : B28_tb.Text = "Feb"
- ElseIf Strings.Mid(保固日, 6, 2) = "03" Then : B28_tb.Text = "Ber" : ElseIf Strings.Mid(保固日, 6, 2) = "04" Then : B28_tb.Text = "Apr"
- ElseIf Strings.Mid(保固日, 6, 2) = "05" Then : B28_tb.Text = "Mun" : ElseIf Strings.Mid(保固日, 6, 2) = "06" Then : B28_tb.Text = "Jun"
- ElseIf Strings.Mid(保固日, 6, 2) = "07" Then : B28_tb.Text = "Jul" : ElseIf Strings.Mid(保固日, 6, 2) = "08" Then : B28_tb.Text = "Agu"
- ElseIf Strings.Mid(保固日, 6, 2) = "09" Then : B28_tb.Text = "Sep" : ElseIf Strings.Mid(保固日, 6, 2) = "10" Then : B28_tb.Text = "Okt"
- ElseIf Strings.Mid(保固日, 6, 2) = "11" Then : B28_tb.Text = "Nov" : ElseIf Strings.Mid(保固日, 6, 2) = "12" Then : B28_tb.Text = "Des" : End If
- End If
- 甲方_tb.Text = 合約_dgv("約號甲方", 選擇項).Value.ToString
- 客戶名稱_tb.Text = 合約_dgv("客戶名稱", 選擇項).Value.ToString : 工程名稱_英_tb.Text = 合約_dgv("工程名稱_英", 選擇項).Value.ToString
- 工程名稱_中_tb.Text = 合約_dgv(表頭(2), 選擇項).Value.ToString : 工程款1_nud.Value = 合約_dgv("第一期比例", 選擇項).Value
- 工程款2_nud.Value = 合約_dgv("第二期比例", 選擇項).Value : 工程款3_nud.Value = 合約_dgv("第三期比例", 選擇項).Value
- 工程款4_nud.Value = 合約_dgv("第四期比例", 選擇項).Value : 工程款5_nud.Value = 合約_dgv("第五期比例", 選擇項).Value
- CH2.Checked = True : NUD3.Value = 合約_dgv("工程總價", 選擇項).Value
- NUD3.Value = 合約_dgv("工程總價", 選擇項).Value : NUD6.Value = 0
- PA1 = "1" : Set_合約明細1() : PA1 = "2" : Set_合約明細2() : PA1 = "3" : Set_合約明細3() : PA1 = "4" : Set_合約明細4() : PA1 = "5" : Set_合約明細5()
-
- Set_附錄清單()
- If 合約附錄_dgv.Rows.Count > 0 Then
- NUD4.Value = 合約附錄_dgv("原金額", 0).Value : NUD5.Value = 合約附錄_dgv("追加減", 0).Value : 附錄編號_tb.Text = 合約附錄_dgv(表頭(4), 0).Value.ToString
- Else : NUD4.Value = 0 : NUD5.Value = 0 : 附錄編號_tb.Text = "" : End If
- Set_請款清單() : 請款計算() : NUD3.Value += 1 : NUD3.Value -= 1
- End Sub
- Private Sub 合約附錄_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 合約附錄_dgv.CellClick
- NUD4.Value = 合約附錄_dgv("原金額", e.RowIndex).Value : NUD5.Value = 合約附錄_dgv("追加減", e.RowIndex).Value
- 附錄編號_tb.Text = 合約附錄_dgv(表頭(4), e.RowIndex).Value.ToString : 請款計算()
- End Sub
- Private Sub 請款單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 請款單_dgv.CellClick
- 請款單號_tb.Text = 請款單_dgv("請款編號", e.RowIndex).Value.ToString : 請款期數_cb.Text = 請款單_dgv(表頭(6), e.RowIndex).Value.ToString
- 請款內容_tb.Text = 請款單_dgv("請款內容", e.RowIndex).Value.ToString : 比例_nud.Value = 請款單_dgv(表頭(7), e.RowIndex).Value
- 請款金額_nud.Value = 請款單_dgv(表頭(8), e.RowIndex).Value : 稅金_nud.Value = 請款單_dgv(表頭(9), e.RowIndex).Value
- 付款期限_cb.Text = 請款單_dgv("付款期限", e.RowIndex).Value.ToString : 申請日期_dtp.Value = 請款單_dgv(表頭(11), e.RowIndex).Value
- 其他意見_tb.Text = 請款單_dgv("審批意見", e.RowIndex).Value.ToString : 請款總額_nud.Value = 請款單_dgv(表頭(10), e.RowIndex).Value
- 請款_tb.Text = 請款單_dgv("分期", e.RowIndex).Value.ToString
- 報告移交計算()
- End Sub
- Private Sub 第1期_dgv_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 第1期_dgv.CellEnter
- If Not IsNumeric(第1期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value) Then
- MGB(系統語言字典("G000-180-" & 語言), 1)
- 第1期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第1期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- Dim nn As Integer
- For i As Integer = 0 To 第1期_dgv.Rows.Count - 1 : nn += 第1期_dgv.Rows(i).Cells(表頭(14)).Value : Next
- If nn > 工程款1_nud.Value Then
- Dim SS As String
- SS = 系統語言字典("H108-123-" & 語言) : MGB(SS & Strings.Format(工程款1_nud.Value, "#,##0.00") & " % !!", 1)
- 第1期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第1期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- For i As Integer = 0 To 第1期_dgv.Rows.Count - 1
- If 工程款1_nud.Value = 0 Then
- 第1期_dgv.Rows(i).Cells(表頭(15)).Value = 0
- Else
- 第1期_dgv.Rows(i).Cells(表頭(15)).Value = 第1期_dgv.Rows(i).Cells(表頭(14)).Value * 金額1_und.Value / 工程款1_nud.Value
- End If
- Next i
- End If
- End If
- End Sub
- Private Sub 第2期_dgv_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 第2期_dgv.CellEnter
- If Not IsNumeric(第2期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value) Then
- MGB(系統語言字典("G000-180-" & 語言), 1)
- 第2期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第2期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- Dim nn As Integer
- For i As Integer = 0 To 第2期_dgv.Rows.Count - 1 : nn += 第2期_dgv.Rows(i).Cells(表頭(14)).Value : Next
- If nn > 工程款2_nud.Value Then
- Dim SS As String
- SS = 系統語言字典("H108-124-" & 語言) : MGB(SS & Strings.Format(工程款2_nud.Value, "#,##0.00") & " % !!", 1)
- 第2期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第2期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- For i As Integer = 0 To 第2期_dgv.Rows.Count - 1
- If 工程款2_nud.Value = 0 Then
- 第2期_dgv.Rows(i).Cells(表頭(15)).Value = 0
- Else
- 第2期_dgv.Rows(i).Cells(表頭(15)).Value = 第2期_dgv.Rows(i).Cells(表頭(14)).Value * 金額2_und.Value / 工程款2_nud.Value
- End If
- Next i
- End If
- End If
- End Sub
- Private Sub 第3期_dgv_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 第3期_dgv.CellEnter
- If Not IsNumeric(第3期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value) Then
- MGB(系統語言字典("G000-180-" & 語言), 1)
- 第3期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第3期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- Dim nn As Integer
- For i As Integer = 0 To 第3期_dgv.Rows.Count - 1 : nn += 第3期_dgv.Rows(i).Cells(表頭(14)).Value : Next
- If nn > 工程款3_nud.Value Then
- Dim SS As String
- SS = 系統語言字典("H108-125-" & 語言) : MGB(SS & Strings.Format(工程款3_nud.Value, "#,##0.00") & " % !!", 1)
- 第3期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第3期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- For i As Integer = 0 To 第3期_dgv.Rows.Count - 1
- If 工程款3_nud.Value = 0 Then
- 第3期_dgv.Rows(i).Cells(表頭(15)).Value = 0
- Else
- 第3期_dgv.Rows(i).Cells(表頭(15)).Value = 第3期_dgv.Rows(i).Cells(表頭(14)).Value * 金額3_und.Value / 工程款3_nud.Value
- End If
- Next i
- End If
- End If
- End Sub
- Private Sub 第4期_dgv_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 第4期_dgv.CellEnter
- If Not IsNumeric(第4期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value) Then
- MGB(系統語言字典("G000-180-" & 語言), 1)
- 第4期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第4期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- Dim nn As Integer
- For i As Integer = 0 To 第4期_dgv.Rows.Count - 1 : nn += 第4期_dgv.Rows(i).Cells(表頭(14)).Value : Next
- If nn > 工程款4_nud.Value Then
- Dim SS As String
- SS = 系統語言字典("H108-126-" & 語言) : MGB(SS & Strings.Format(工程款4_nud.Value, "#,##0.00") & " % !!", 1)
- 第4期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第4期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- For i As Integer = 0 To 第4期_dgv.Rows.Count - 1
- If 工程款4_nud.Value = 0 Then
- 第4期_dgv.Rows(i).Cells(表頭(15)).Value = 0
- Else
- 第4期_dgv.Rows(i).Cells(表頭(15)).Value = 第4期_dgv.Rows(i).Cells(表頭(14)).Value * 金額4_und.Value / 工程款4_nud.Value
- End If
- Next i
- End If
- End If
- End Sub
- Private Sub 第5期_dgv_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 第5期_dgv.CellEnter
- If Not IsNumeric(第5期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value) Then
- MGB(系統語言字典("G000-180-" & 語言), 1)
- 第5期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第5期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- Dim nn As Integer
- For i As Integer = 0 To 第5期_dgv.Rows.Count - 1 : nn += 第5期_dgv.Rows(i).Cells(表頭(14)).Value : Next
- If nn > 工程款5_nud.Value Then
- Dim SS As String
- SS = 系統語言字典("H108-127-" & 語言) : MGB(SS & Strings.Format(工程款5_nud.Value, "#,##0.00") & " % !!", 1)
- 第5期_dgv.Rows(e.RowIndex).Cells(表頭(14)).Value = "0" : 第5期_dgv.Rows(e.RowIndex).Cells(表頭(15)).Value = "0"
- Else
- For i As Integer = 0 To 第5期_dgv.Rows.Count - 1
- If 工程款5_nud.Value = 0 Then
- 第5期_dgv.Rows(i).Cells(表頭(15)).Value = 0
- Else
- 第5期_dgv.Rows(i).Cells(表頭(15)).Value = 第5期_dgv.Rows(i).Cells(表頭(14)).Value * 金額5_und.Value / 工程款5_nud.Value
- End If
- Next i
- End If
- End If
- End Sub
- Private Sub 第1期_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 第1期_dgv.CellClick
- If e.RowIndex = -1 Then : Else : 明細選項_bt.Text = 第1期_dgv(表頭(12), e.RowIndex).Value.ToString : 明細選項_bt.Text = Strings.Format(Val(明細選項_bt.Text), "#,##0") : End If
- End Sub
- Private Sub 第2期_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 第2期_dgv.CellClick
- If e.RowIndex = -1 Then : Else : 明細選項_bt.Text = 第2期_dgv(表頭(12), e.RowIndex).Value.ToString : 明細選項_bt.Text = Strings.Format(Val(明細選項_bt.Text), "#,##0") : End If
- End Sub
- Private Sub 第3期_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 第3期_dgv.CellClick
- If e.RowIndex = -1 Then : Else : 明細選項_bt.Text = 第3期_dgv(表頭(12), e.RowIndex).Value.ToString : 明細選項_bt.Text = Strings.Format(Val(明細選項_bt.Text), "#,##0") : End If
- End Sub
- Private Sub 第4期_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 第4期_dgv.CellClick
- If e.RowIndex = -1 Then : Else : 明細選項_bt.Text = 第4期_dgv(表頭(12), e.RowIndex).Value.ToString : 明細選項_bt.Text = Strings.Format(Val(明細選項_bt.Text), "#,##0") : End If
- End Sub
- Private Sub 第5期_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 第5期_dgv.CellClick
- If e.RowIndex = -1 Then : Else : 明細選項_bt.Text = 第5期_dgv(表頭(12), e.RowIndex).Value.ToString : 明細選項_bt.Text = Strings.Format(Val(明細選項_bt.Text), "#,##0") : End If
- End Sub
- Private Sub 合約編號1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 合約編號1_cb.SelectedIndexChanged
- Set_合約清單()
- End Sub
- Private Sub 合約編號1_cb_Click(sender As Object, e As EventArgs) Handles 合約編號1_cb.Click
- CB選擇清單(合約編號1_cb)
- End Sub
- Private Sub 工程期1_ch_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 工程期1_ch.SelectedIndexChanged
- Set_合約清單()
- End Sub
- Private Sub NUD3_ValueChanged(sender As Object, e As EventArgs) Handles NUD3.ValueChanged
- If CH2.Checked = True Then
- If 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " Then : NUD2.Value = NUD3.Value / 110 * 10 : Else : NUD2.Value = NUD3.Value / 111 * 11 : End If
- NUD1.Value = NUD3.Value - NUD2.Value
- 金額1_und.Value = NUD3.Value / 100 * 工程款1_nud.Value : 金額2_und.Value = NUD3.Value / 100 * 工程款2_nud.Value
- 金額3_und.Value = NUD3.Value / 100 * 工程款3_nud.Value : 金額4_und.Value = NUD3.Value / 100 * 工程款4_nud.Value
- 金額5_und.Value = NUD3.Value / 100 * 工程款5_nud.Value
- 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End If
- End Sub
- Private Sub NUD1_ValueChanged(sender As Object, e As EventArgs) Handles NUD1.ValueChanged
- If CH1.Checked = True Then
- NUD2.Value = NUD1.Value / 100 * 10 : NUD3.Value = NUD1.Value + NUD2.Value
-
- 金額1_und.Value = NUD3.Value / 100 * 工程款1_nud.Value : 金額2_und.Value = NUD3.Value / 100 * 工程款2_nud.Value
- 金額3_und.Value = NUD3.Value / 100 * 工程款3_nud.Value : 金額4_und.Value = NUD3.Value / 100 * 工程款4_nud.Value
- 金額5_und.Value = NUD3.Value / 100 * 工程款5_nud.Value
- 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End If
- End Sub
- Private Sub CH1_CheckedChanged(sender As Object, e As EventArgs) Handles CH1.Click
- CH1.Checked = True : CH2.Checked = False : NUD1.Enabled = True : NUD3.Enabled = False
- End Sub
- Private Sub CH2_CheckedChanged(sender As Object, e As EventArgs) Handles CH2.Click
- CH1.Checked = False : CH2.Checked = True : NUD1.Enabled = False : NUD3.Enabled = True
- End Sub
- Private Sub 工程款1_nud_ValueChanged(sender As Object, e As EventArgs) Handles 工程款1_nud.ValueChanged
- 工程款6_nud.Value = 工程款1_nud.Value + 工程款2_nud.Value + 工程款3_nud.Value + 工程款4_nud.Value + 工程款5_nud.Value
- 金額1_und.Value = NUD3.Value / 100 * 工程款1_nud.Value : 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End Sub
- Private Sub 工程款2_nud_ValueChanged(sender As Object, e As EventArgs) Handles 工程款2_nud.ValueChanged
- 工程款6_nud.Value = 工程款1_nud.Value + 工程款2_nud.Value + 工程款3_nud.Value + 工程款4_nud.Value + 工程款5_nud.Value
- 金額2_und.Value = NUD3.Value / 100 * 工程款2_nud.Value : 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End Sub
- Private Sub 工程款3_nud_ValueChanged(sender As Object, e As EventArgs) Handles 工程款3_nud.ValueChanged
- 工程款6_nud.Value = 工程款1_nud.Value + 工程款2_nud.Value + 工程款3_nud.Value + 工程款4_nud.Value + 工程款5_nud.Value
- 金額3_und.Value = NUD3.Value / 100 * 工程款3_nud.Value : 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End Sub
- Private Sub 工程款4_nud_ValueChanged(sender As Object, e As EventArgs) Handles 工程款4_nud.ValueChanged
- 工程款6_nud.Value = 工程款1_nud.Value + 工程款2_nud.Value + 工程款3_nud.Value + 工程款4_nud.Value + 工程款5_nud.Value
- 金額4_und.Value = NUD3.Value / 100 * 工程款4_nud.Value : 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End Sub
- Private Sub 工程款5_nud_ValueChanged(sender As Object, e As EventArgs) Handles 工程款5_nud.ValueChanged
- 工程款6_nud.Value = 工程款1_nud.Value + 工程款2_nud.Value + 工程款3_nud.Value + 工程款4_nud.Value + 工程款5_nud.Value
- 金額5_und.Value = NUD3.Value / 100 * 工程款5_nud.Value : 金額6_und.Value = 金額1_und.Value + 金額2_und.Value + 金額3_und.Value + 金額4_und.Value + 金額5_und.Value
- End Sub
- Private Sub NUD4_ValueChanged(sender As Object, e As EventArgs) Handles NUD4.ValueChanged
- NUD6.Value = NUD4.Value + NUD5.Value
- End Sub
- Private Sub NUD5_ValueChanged(sender As Object, e As EventArgs) Handles NUD5.ValueChanged
- NUD6.Value = NUD4.Value + NUD5.Value
- End Sub
- Private Sub 比例_nud_ValueChanged(sender As Object, e As EventArgs) Handles 比例_nud.ValueChanged
- 請款金額_nud.Value = NUD1.Value / 100 * 比例_nud.Value
- End Sub
- Private Sub 稅金_nud_ValueChanged(sender As Object, e As EventArgs) Handles 稅金_nud.ValueChanged
- 請款總額_nud.Value = 請款金額_nud.Value / 100 * 稅金_nud.Value + 請款金額_nud.Value
- End Sub
- Private Sub 請款金額_nud_ValueChanged(sender As Object, e As EventArgs) Handles 請款金額_nud.ValueChanged
- If 請款金額_nud.Value / NUD1.Value * 100 > 100 Then : 比例_nud.Value = 100 : Else : 比例_nud.Value = 請款金額_nud.Value / NUD1.Value * 100 : End If
- 請款總額_nud.Value = 請款金額_nud.Value / 100 * 稅金_nud.Value + 請款金額_nud.Value
- End Sub
- Private Sub 請款總額_nud_ValueChanged(sender As Object, e As EventArgs) Handles 請款總額_nud.ValueChanged
- 請款金額_nud.Value = 請款總額_nud.Value / (100 + 稅金_nud.Value) * 100
- End Sub
- Private Sub 請款期數_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 請款期數_cb.SelectedIndexChanged
- If 請款期數_cb.Text = "" Then : 比例_nud.Value = 0
- ElseIf 請款期數_cb.Text = "一" Then
- 比例_nud.Value = 工程款1_nud.Value : 請款內容_tb.Text = "Prepayments 預付款" : 主頁明細_ch.Checked = False : 報告移交單_ch.Checked = False
- ElseIf 請款期數_cb.Text = "二" Then
- 比例_nud.Value = 工程款2_nud.Value : 請款內容_tb.Text = "Material Cost Application 材料到貨款" : 主頁明細_ch.Checked = False : 報告移交單_ch.Checked = False
- ElseIf 請款期數_cb.Text = "三" Then
- 比例_nud.Value = 工程款3_nud.Value : 請款內容_tb.Text = "Installation Fee Application 施工請款 " : 主頁明細_ch.Checked = False : 報告移交單_ch.Checked = False
- ElseIf 請款期數_cb.Text = "四" Then
- 比例_nud.Value = 工程款4_nud.Value : 請款內容_tb.Text = "Final Acceptance 驗收款 " : 主頁明細_ch.Checked = True : 報告移交單_ch.Checked = True
- ElseIf 請款期數_cb.Text = "五" Then
- 比例_nud.Value = 工程款5_nud.Value : 請款內容_tb.Text = "Assure 保留款 " : 主頁明細_ch.Checked = False : 報告移交單_ch.Checked = True
- End If
- End Sub
- Private Sub 請款期數_cb_Click(sender As Object, e As EventArgs) Handles 請款期數_cb.Click
- CB選擇清單(請款期數_cb)
- End Sub
- Private Sub 新增資料_bt_Click(sender As Object, e As EventArgs) Handles 新增資料_bt.Click
- If 合約編號_tb.Text = "" Then : MGB(系統語言字典("H108-128-" & 語言), 1) : Else
- If 工程款6_nud.Value <> 100 Then : MGB(系統語言字典("H108-129-" & 語言), 1) : Else
- PA = 合約編號_tb.Text : 合約明細存檔()
- Dim SS As String
- SS = 系統語言字典("H108-130-" & 語言)
- If TabControl2.SelectedIndex = 0 Then
- If 第1期_dgv.Rows.Count = 10 Then : MGB(SS, 1) : Else : PA1 = "1" : PA2 = 第1期_dgv.Rows.Count + 1 : SQL_合約明細新增() : End If
- ElseIf TabControl2.SelectedIndex = 1 Then
- If 第2期_dgv.Rows.Count = 10 Then : MGB(SS, 1) : Else : PA1 = "2" : PA2 = 第2期_dgv.Rows.Count + 1 : SQL_合約明細新增() : End If
- ElseIf TabControl2.SelectedIndex = 2 Then
- If 第3期_dgv.Rows.Count = 10 Then : MGB(SS, 1) : Else : PA1 = "3" : PA2 = 第3期_dgv.Rows.Count + 1 : SQL_合約明細新增() : End If
- ElseIf TabControl2.SelectedIndex = 3 Then
- If 第4期_dgv.Rows.Count = 10 Then : MGB(SS, 1) : Else : PA1 = "4" : PA2 = 第4期_dgv.Rows.Count + 1 : SQL_合約明細新增() : End If
- ElseIf TabControl2.SelectedIndex = 4 Then
- If 第5期_dgv.Rows.Count = 10 Then : MGB(SS, 1) : Else : PA1 = "5" : PA2 = 第5期_dgv.Rows.Count + 1 : SQL_合約明細新增() : End If
- End If
- PA = 合約編號_tb.Text
- PA1 = "1" : Set_合約明細1() : PA1 = "2" : Set_合約明細2() : PA1 = "3" : Set_合約明細3() : PA1 = "4" : Set_合約明細4() : PA1 = "5" : Set_合約明細5()
- MGB(系統語言字典("G000-118-" & 語言), 1)
- End If
- End If
- End Sub
- Private Sub 刪除資料_bt_Click(sender As Object, e As EventArgs) Handles 刪除資料_bt.Click
- If 合約編號_tb.Text = "" Or 明細選項_bt.Text = "" Then : MGB(系統語言字典("H108-128-" & 語言), 1) : Else
- If 工程款6_nud.Value <> 100 Then : MGB(系統語言字典("H108-129-" & 語言), 1) : Else
- PA = 合約編號_tb.Text
- If TabControl2.SelectedIndex = 0 Then : PA1 = "1" : PA2 = 明細選項_bt.Text : SQL_合約明細刪除()
- ElseIf TabControl2.SelectedIndex = 1 Then : PA1 = "2" : PA2 = 明細選項_bt.Text : SQL_合約明細刪除()
- ElseIf TabControl2.SelectedIndex = 2 Then : PA1 = "3" : PA2 = 明細選項_bt.Text : SQL_合約明細刪除()
- ElseIf TabControl2.SelectedIndex = 3 Then : PA1 = "4" : PA2 = 明細選項_bt.Text : SQL_合約明細刪除()
- ElseIf TabControl2.SelectedIndex = 4 Then : PA1 = "5" : PA2 = 明細選項_bt.Text : SQL_合約明細刪除()
- End If
- PA = 合約編號_tb.Text
- PA1 = "1" : Set_合約明細1() : PA1 = "2" : Set_合約明細2() : PA1 = "3" : Set_合約明細3() : PA1 = "4" : Set_合約明細4() : PA1 = "5" : Set_合約明細5()
- MGB(系統語言字典("G000-120-" & 語言), 1)
- End If
- End If
- End Sub
- Private Sub 存檔_tb_Click(sender As Object, e As EventArgs) Handles 存檔_tb.Click
- 合約明細存檔() : MGB(系統語言字典("G000-119-" & 語言), 1)
- End Sub
- Private Sub 合約明細存檔()
- For i As Integer = 0 To 第1期_dgv.Rows.Count - 1
- PA1 = "1" : PA2 = 第1期_dgv.Rows(i).Cells(表頭(12)).Value : PA3 = 第1期_dgv.Rows(i).Cells(表頭(13)).Value
- NU1 = 第1期_dgv.Rows(i).Cells(表頭(14)).Value : NU2 = 第1期_dgv.Rows(i).Cells(表頭(15)).Value : SQL_合約明細修改()
- Next
- For i As Integer = 0 To 第2期_dgv.Rows.Count - 1
- PA1 = "2" : PA2 = 第2期_dgv.Rows(i).Cells(表頭(12)).Value : PA3 = 第2期_dgv.Rows(i).Cells(表頭(13)).Value
- NU1 = 第2期_dgv.Rows(i).Cells(表頭(14)).Value : NU2 = 第2期_dgv.Rows(i).Cells(表頭(15)).Value : SQL_合約明細修改()
- Next
- For i As Integer = 0 To 第3期_dgv.Rows.Count - 1
- PA1 = "3" : PA2 = 第3期_dgv.Rows(i).Cells(表頭(12)).Value : PA3 = 第3期_dgv.Rows(i).Cells(表頭(13)).Value
- NU1 = 第3期_dgv.Rows(i).Cells(表頭(14)).Value : NU2 = 第3期_dgv.Rows(i).Cells(表頭(15)).Value : SQL_合約明細修改()
- Next
- For i As Integer = 0 To 第4期_dgv.Rows.Count - 1
- PA1 = "4" : PA2 = 第4期_dgv.Rows(i).Cells(表頭(12)).Value : PA3 = 第4期_dgv.Rows(i).Cells(表頭(13)).Value
- NU1 = 第4期_dgv.Rows(i).Cells(表頭(14)).Value : NU2 = 第4期_dgv.Rows(i).Cells(表頭(15)).Value : SQL_合約明細修改()
- Next
- For i As Integer = 0 To 第5期_dgv.Rows.Count - 1
- PA1 = "5" : PA2 = 第5期_dgv.Rows(i).Cells(表頭(12)).Value : PA3 = 第5期_dgv.Rows(i).Cells(表頭(13)).Value
- NU1 = 第5期_dgv.Rows(i).Cells(表頭(14)).Value : NU2 = 第5期_dgv.Rows(i).Cells(表頭(15)).Value : SQL_合約明細修改()
- Next
- End Sub
- Private Sub 查詢_bt_Click(sender As Object, e As EventArgs) Handles 查詢_bt.Click
- PA = 關鍵字搜尋_tb.Text : Set_合約清單()
- End Sub
- Private Sub 開新的請款單_bt_Click(sender As Object, e As EventArgs) Handles 開新的請款單_bt.Click
- If 合約編號_tb.Text = "" Then : MGB(系統語言字典("H110-111-" & 語言), 1) : Else
- SQL_請款單_最後一筆資料()
- If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("請款編號").ToString, 9)) : Else : EDR = 0 : End If
- conn.Close() : EDR += 1
- If EDR < 10 Then : ESTR = "HP" & "00000000" & EDR : ElseIf EDR > 9 And EDR < 100 Then : ESTR = "HP" & "0000000" & EDR
- ElseIf EDR > 99 And EDR < 1000 Then : ESTR = "HP" & "000000" & EDR : ElseIf EDR > 999 And EDR < 10000 Then : ESTR = "HP" & "00000" & EDR
- ElseIf EDR > 9999 And EDR < 100000 Then : ESTR = "HP" & "0000" & EDR : ElseIf EDR > 99999 And EDR < 100000 Then : ESTR = "HP" & "000" & EDR
- ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "HP" & "00" & EDR : ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "HP" & "0" & EDR
- ElseIf EDR > 99999999 Then : ESTR = "HP" & EDR : End If
- 請款單號_tb.Text = ESTR : 請款期數_cb.Text = "" : 比例_nud.Value = 0 : 稅金_nud.Value = 11
- 付款期限_cb.Text = "" : 申請日期_dtp.Value = Today()
- End If
- End Sub
- Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
- If 合約編號_tb.Text = "" Then : MGB(系統語言字典("H110-111-" & 語言), 1) : Else
- If 請款單號_tb.Text = "" Then : MGB(系統語言字典("H108-131-" & 語言), 1) : Else
- If 請款期數_cb.Text = "" Then : MGB(系統語言字典("H108-132-" & 語言), 1) : Else
- If 請款金額_nud.Value = 0 Then : MGB(系統語言字典("H108-133-" & 語言), 1) : Else
- If 付款期限_cb.Text = "" Then : MGB(系統語言字典("H108-134-" & 語言), 1) : Else
- PA = 合約編號_tb.Text : PA1 = 請款單號_tb.Text : PA2 = 請款期數_cb.Text : PA3 = 請款內容_tb.Text : PA4 = 請款金額_nud.Value : PA5 = 稅金_nud.Value
- PA6 = 付款期限_cb.Text : PA7 = Strings.Format(申請日期_dtp.Value, "yyyy/MM/dd") : PA8 = 其他意見_tb.Text : PA9 = 請款總額_nud.Value : PA10 = 比例_nud.Value
- SQL_請款單_最後一筆資料1()
- If dr.Read() Then : SQL_請款單_修改()
- Else : If 請款金額_nud.Value > ANUD5.Value Then : MGB(系統語言字典("H108-135-" & 語言), 1) : Else : SQL_請款單_新增() : End If
- End If : Set_請款清單() : 請款計算() : MGB(系統語言字典("G000-119-" & 語言), 1)
- End If
- End If
- End If
- End If
- End If
- End Sub
- Private Sub 刪除_bt_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
- If 合約編號_tb.Text = "" Then : MGB(系統語言字典("H110-111-" & 語言), 1) : Else
- If 請款單號_tb.Text = "" Then : MGB(系統語言字典("H108-136-" & 語言), 1)
- Else : PA1 = 請款單號_tb.Text : SQL_請款單_刪除() : Set_請款清單() : 請款計算() : MGB(系統語言字典("H108-137-" & 語言), 1) : End If
- End If
- End Sub
- Private Sub 報告移交()
- B02_tb.Text = Strings.Right(Strings.Format(Today(), "yyyy/MM/dd"), 2) : B04_tb.Text = Strings.Left(Strings.Format(Today(), "yyyy/MM/dd"), 4)
- If Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "01" Then : B03_tb.Text = "Jan"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "02" Then : B03_tb.Text = "Feb"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "03" Then : B03_tb.Text = "Ber"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "04" Then : B03_tb.Text = "Apr"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "05" Then : B03_tb.Text = "Mun"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "06" Then : B03_tb.Text = "Jun"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "07" Then : B03_tb.Text = "Jul"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "08" Then : B03_tb.Text = "Agu"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "09" Then : B03_tb.Text = "Sep"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "10" Then : B03_tb.Text = "Okt"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "11" Then : B03_tb.Text = "Nov"
- ElseIf Strings.Mid(Strings.Format(Today(), "yyyy/MM/dd"), 6, 2) = "12" Then : B03_tb.Text = "Des" : End If
- B36_tb.Text = B02_tb.Text : B37_tb.Text = B03_tb.Text : B38_tb.Text = B04_tb.Text
- B07_tb.Text = 客戶名稱_tb.Text : B30_tb.Text = 客戶名稱_tb.Text : B42_tb.Text = 客戶名稱_tb.Text : B22_tb.Text = 合約編號_tb.Text : B23_tb.Text = 工程名稱_英_tb.Text
- If Strings.Left(合約編號_tb.Text, 2) = "HX" Then : B12_tb.Text = "PT HONG XHE INDUSTRIAL" : B43_tb.Text = "PT HONG XHE INDUSTRIAL"
- Else : B12_tb.Text = "PT PUNCAK GEMILANG SEMESTA" : B43_tb.Text = "PT PUNCAK GEMILANG SEMESTA" : End If
- End Sub
- Private Sub 報告移交計算()
- If 請款期數_cb.Text = "四" Then
- Dim SS As Integer = 0
- For i As Integer = 0 To 請款單_dgv.Rows.Count - 1 : If 請款單_dgv(表頭(6), i).Value.ToString() <> "五" Then : SS += 請款單_dgv(表頭(7), i).Value : End If : Next
- B32_tb.Text = "Pihak kesatu (I) telah memeriksa hasil pekerjaan Pihak kedua (II) yang telah selesai dikerjakan sesuai dengan kontrak."
- A01_lb.Text = "BERITA ACARA SERAH TERIMA PERTAMA" : B31_tb.Text = "Penagihan Invoice Pelunasan " & SS & "%" : 報告移交()
- B19_tb.Visible = True : B27_tb.Visible = True : B28_tb.Visible = True : B29_tb.Visible = True : B33_tb.Visible = True
- B44_tb.Visible = True : B45_tb.Visible = True : B46_tb.Visible = True : 報告移交單_ch.Enabled = True
- ElseIf 請款期數_cb.Text = "五" Then
- B32_tb.Text = "Pihak kesatu (I) telah memeriksa hasil pekerjaan Pihak kedua (II) yang telah selesai dikerjakan dan dinyatakan 100% selesai dalam masa garansi."
- A01_lb.Text = "BERITA ACARA SERAH TERIMA KEDUA" : B31_tb.Text = "Penagihan Invoice Pelunasan 100%" : 報告移交()
- B19_tb.Visible = False : B27_tb.Visible = False : B28_tb.Visible = False : B29_tb.Visible = False : B33_tb.Visible = False
- B44_tb.Visible = False : B45_tb.Visible = False : B46_tb.Visible = False : 報告移交單_ch.Enabled = True
- Else
- 視窗2_pl.Visible = False : 報告移交單_ch.Enabled = False : 報告移交單_ch.Checked = False
- End If
- End Sub
- Private Sub 報告移交_bt_Click(sender As Object, e As EventArgs) Handles 報告移交_bt.Click
- If 視窗2_pl.Visible = False Then : 視窗2_pl.BringToFront()
- If 請款期數_cb.Text = "四" Then : 視窗2_pl.Location = New System.Drawing.Point(261, 19) : 視窗2_pl.Visible = True : 報告移交計算()
- ElseIf 請款期數_cb.Text = "五" Then : 視窗2_pl.Location = New System.Drawing.Point(261, 19) : 視窗2_pl.Visible = True : 報告移交計算()
- Else : 視窗2_pl.Visible = False : 報告移交單_ch.Checked = False : MGB(系統語言字典("H108-138-" & 語言), 1) : End If
- Else : 視窗2_pl.Visible = False : End If
- End Sub
- Private Sub CanceL2_bt_Click(sender As Object, e As EventArgs) Handles CanceL2_bt.Click
- If 視窗2_pl.Visible = False Then : 視窗2_pl.Visible = True : 視窗2_pl.BringToFront() : Else
- 視窗2_pl.Visible = False : End If
- End Sub
- Private Sub 視窗2_pl_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 視窗2_pl.MouseDown
- If e.Button = MouseButtons.Left Then : OldX = e.X : OldY = e.Y : drag = True : End If
- End Sub
- Private Sub 視窗2_pl_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 視窗2_pl.MouseMove
- If drag Then : 視窗2_pl.Left = 視窗2_pl.Left + e.X - OldX : 視窗2_pl.Top = 視窗2_pl.Top + e.Y - OldY : End If
- End Sub
- Private Sub 縮放2_bt_Click(sender As Object, e As EventArgs) Handles 縮放2_bt.Click
- Dim NX, NY As Integer : NX = 合約_dgv.Size.Width : NY = 合約_dgv.Size.Height
- If 放大 = True Then
- 合約_dgv.Size = New System.Drawing.Point(NX - 400, NY) : 放大 = False : 合約_dgv.Columns(表頭(2)).Visible = False
- Else
- 合約_dgv.Size = New System.Drawing.Point(NX + 400, NY) : 放大 = True : 合約_dgv.Columns(表頭(2)).Visible = True
- End If
- End Sub
- Private Sub 視窗2_pl_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 視窗2_pl.MouseUp
- drag = False
- End Sub
- Private Sub 縮放2_bt_MouseEnter(sender As Object, e As EventArgs) Handles 縮放2_bt.MouseEnter
- ToolTip1.SetToolTip(Me.縮放2_bt, 系統語言字典("G000-198-" & 語言))
- End Sub
- Private Sub 查詢_bt_MouseEnter(sender As Object, e As EventArgs) Handles 查詢_bt.MouseEnter
- ToolTip1.SetToolTip(Me.查詢_bt, 系統語言字典("G000-113-" & 語言))
- End Sub
- Private Sub 開新的請款單_bt_MouseEnter(sender As Object, e As EventArgs) Handles 開新的請款單_bt.MouseEnter
- ToolTip1.SetToolTip(Me.開新的請款單_bt, 系統語言字典("H108-139-" & 語言))
- End Sub
- Private Sub 存檔_bt_MouseEnter(sender As Object, e As EventArgs) Handles 存檔_bt.MouseEnter
- ToolTip1.SetToolTip(Me.存檔_bt, 系統語言字典("G000-110-" & 語言))
- End Sub
- Private Sub 報告移交_bt_MouseEnter(sender As Object, e As EventArgs) Handles 報告移交_bt.MouseEnter
- ToolTip1.SetToolTip(Me.報告移交_bt, 系統語言字典("H108-140-" & 語言))
- End Sub
- Private Sub 列印_bt_MouseEnter(sender As Object, e As EventArgs) Handles 列印_bt.MouseEnter
- ToolTip1.SetToolTip(Me.列印_bt, 系統語言字典("G000-114-" & 語言))
- End Sub
- Private Sub 刪除_bt_MouseEnter(sender As Object, e As EventArgs) Handles 刪除_bt.MouseEnter
- ToolTip1.SetToolTip(Me.刪除_bt, 系統語言字典("G000-112-" & 語言))
- End Sub
- Private Sub 列印_bt_Click(sender As Object, e As EventArgs) Handles 列印_bt.Click
- If 合約編號_tb.Text = "" Then : MGB(系統語言字典("H110-111-" & 語言), 1) : Else
- If 請款單號_tb.Text = "" Then : MGB(系統語言字典("H108-136-" & 語言), 1) : Else
- If 請款期數_cb.Text = "" Then : MGB(系統語言字典("H108-141-" & 語言), 1) : Else
- If 請款金額_nud.Value = 0 Then : MGB(系統語言字典("H108-142-" & 語言), 1) : Else
- If 付款期限_cb.Text = "" Then : MGB(系統語言字典("H108-143-" & 語言), 1) : Else
- Try
- xlApp = CType(CreateObject("Excel.Application"), Application)
- xlApp.Visible = True
- xlApp.DisplayAlerts = True
- xlApp.Application.WindowState = xlMaximized
- xlBook = xlApp.Workbooks.Add
- '----------------------------------------------------------------------------------------------------------------------
- If 報告移交單_ch.Checked = True Then
- xlSheet = NewMethod(xlBook) : xlApp.Sheets(1).Select : xlApp.Sheets(1).Name = "報告移交單"
- xlBook.Activate() : xlSheet.Activate()
-
- xlSheet.Cells(2, 1) = A01_lb.Text : xlSheet.Cells(4, 1) = B01_tb.Text & " " & B02_tb.Text & " " & B03_tb.Text & " " & B04_tb.Text & " " & B05_tb.Text
- xlSheet.Cells(6, 1) = B06_tb.Text : xlSheet.Cells(6, 3) = B07_tb.Text : xlSheet.Cells(7, 1) = B08_tb.Text : xlSheet.Cells(7, 3) = B09_tb.Text
- xlSheet.Cells(9, 1) = B10_tb.Text : xlSheet.Cells(11, 1) = B11_tb.Text : xlSheet.Cells(11, 3) = B12_tb.Text : xlSheet.Cells(12, 1) = B13_tb.Text
- xlSheet.Cells(12, 3) = B14_tb.Text : xlSheet.Cells(14, 1) = B15_tb.Text
- xlSheet.Cells(16, 2) = B16_tb.Text : xlSheet.Cells(16, 3) = "':" : xlSheet.Cells(16, 4) = B22_tb.Text
- xlSheet.Cells(17, 2) = B17_tb.Text : xlSheet.Cells(17, 3) = "':" : xlSheet.Cells(17, 4) = B23_tb.Text
- xlSheet.Cells(18, 2) = B18_tb.Text : xlSheet.Cells(18, 3) = "':" : xlSheet.Cells(18, 4) = B24_tb.Text & " " & B25_tb.Text & " " & B26_tb.Text
- Dim NX As Integer = 19
- If 請款期數_cb.Text = "四" Then
- xlSheet.Cells(NX, 2) = B19_tb.Text : xlSheet.Cells(NX, 3) = "':" : xlSheet.Cells(NX, 4) = B27_tb.Text & " " & B28_tb.Text & " " & B29_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B20_tb.Text : xlSheet.Cells(NX, 3) = "':" : xlSheet.Cells(NX, 4) = B30_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B21_tb.Text : xlSheet.Cells(NX, 3) = "':" : xlSheet.Cells(NX, 4) = B31_tb.Text : NX += 2
- xlSheet.Cells(NX, 1) = B32_tb.Text : NX += 1
- xlSheet.Cells(NX, 1) = B33_tb.Text + " " + B44_tb.Text + " " + B45_tb.Text + " " & B46_tb.Text : NX += 1
- xlSheet.Cells(NX, 1) = B34_tb.Text : NX += 2
- xlSheet.Cells(NX, 4) = B35_tb.Text : xlSheet.Cells(NX, 5) = B36_tb.Text & " " & B37_tb.Text & " " & B38_tb.Text : NX += 2
- xlSheet.Cells(NX, 5) = B39_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B40_tb.Text : xlSheet.Cells(NX, 5) = B41_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B42_tb.Text : xlSheet.Cells(NX, 5) = B43_tb.Text
- Else
- xlSheet.Cells(NX, 2) = B20_tb.Text : xlSheet.Cells(NX, 3) = "':" : xlSheet.Cells(NX, 4) = B30_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B21_tb.Text : xlSheet.Cells(NX, 3) = "':" : xlSheet.Cells(NX, 4) = B31_tb.Text : NX += 2
- xlSheet.Cells(NX, 1) = B32_tb.Text : NX += 1 : xlSheet.Cells(NX, 1) = B34_tb.Text : NX += 2
- xlSheet.Cells(NX, 4) = B35_tb.Text : xlSheet.Cells(NX, 5) = B36_tb.Text & " " & B37_tb.Text & " " & B38_tb.Text : NX += 2
- xlSheet.Cells(NX, 5) = B39_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B40_tb.Text : xlSheet.Cells(NX, 5) = B41_tb.Text : NX += 1
- xlSheet.Cells(NX, 2) = B42_tb.Text : xlSheet.Cells(NX, 5) = B43_tb.Text
- End If
- AB(xlApp, xlSheet)
- If Strings.Left(合約編號_tb.Text, 2) = "HX" Then : CC(xlApp, xlSheet) : Else : DD(xlApp, xlSheet) : End If : FF(xlApp, xlSheet)
- End If
-
- '----------------------------------------------------------------------------------------------------------------------
- If 請款單_ch.Checked = True Then
- xlSheet = NewMethod(xlBook) : xlApp.Sheets(1).Select : xlApp.Sheets(1).Name = "請款單"
- xlBook.Activate() : xlSheet.Activate()
-
- xlSheet.Cells(2, 1) = "請款明細表 Rincian Tagihan" : xlSheet.Cells(3, 1) = "TO : " & 客戶名稱_tb.Text
- xlSheet.Cells(3, 9) = "日期 : " & Strings.Format(Today(), "yyyy/MM/dd")
- xlSheet.Cells(4, 1) = "工程項目 : " & 工程名稱_中_tb.Text & vbCrLf & 工程名稱_英_tb.Text : xlSheet.Cells(4, 9) = "期別 : 第" & 請款期數_cb.Text & "期"
- xlSheet.Cells(5, 1) = "(未稅)本合約工程款 Total Kontrak Sebelum Ppn Rp : "
- If 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " Then : xlSheet.Cells(5, 5) = 金額6_und.Value / 110 * 100 : Else : xlSheet.Cells(5, 5) = 金額6_und.Value / 111 * 100 : End If
- xlSheet.Cells(7, 1) = "No." : xlSheet.Cells(7, 2) = "Description" : xlSheet.Cells(7, 3) = "Rate" : xlSheet.Cells(7, 4) = "Total Amount" & vbCrLf & "總金額"
- xlSheet.Cells(7, 5) = "This Period" & vbCrLf & "本期請款" : xlSheet.Cells(7, 7) = "Accumulation" & vbCrLf & "累計請款" : xlSheet.Cells(7, 9) = "Remarks"
-
- If Label47.Text = 對話框(0) Then
- If 新版_ch.Checked = False Then
- xlSheet.Cells(8, 1) = "1" : xlSheet.Cells(8, 2) = "Prepayments" & vbCrLf & "(預付款)" : xlSheet.Cells(8, 3) = 工程款1_nud.Value / 100
- If 請款期數_cb.Text = "一" Then : xlSheet.Cells(8, 5) = "=C8" : Else : xlSheet.Cells(8, 5) = "0" : End If
- xlSheet.Cells(9, 1) = "2" : xlSheet.Cells(9, 2) = "Material Cost Application" & vbCrLf & "(材料到貨款)" : xlSheet.Cells(9, 3) = 工程款2_nud.Value / 100
- If 請款期數_cb.Text = "二" Then : xlSheet.Cells(9, 5) = "=C9" : Else : xlSheet.Cells(9, 5) = "0" : End If
- xlSheet.Cells(10, 1) = "3" : xlSheet.Cells(10, 2) = "Installation Fee Application" & vbCrLf & "(施工請款)" : xlSheet.Cells(10, 3) = 工程款3_nud.Value / 100
- If 請款期數_cb.Text = "三" Then : xlSheet.Cells(10, 5) = "=C10" : Else : xlSheet.Cells(10, 5) = "0" : End If
- xlSheet.Cells(11, 1) = "4" : xlSheet.Cells(11, 2) = "Final Acceptance" & vbCrLf & "(驗收款)" : xlSheet.Cells(11, 3) = 工程款4_nud.Value / 100
- If 請款期數_cb.Text = "四" Then : xlSheet.Cells(11, 5) = "=C11" : Else : xlSheet.Cells(11, 5) = "0" : End If
- xlSheet.Cells(12, 1) = "5" : xlSheet.Cells(12, 2) = "Assure" & vbCrLf & "(保留款)" : xlSheet.Cells(12, 3) = 工程款5_nud.Value / 100
- If 請款期數_cb.Text = "五" Then : xlSheet.Cells(12, 5) = "=C12" : Else : xlSheet.Cells(12, 5) = "0" : End If
- For i As Integer = 8 To 12
- If i = 11 Then : xlSheet.Cells(i, 4) = "=C" & i & "*$E$5 + " & ANUD3.Value : Else : xlSheet.Cells(i, 4) = "=C" & i & "*$E$5" : End If
- xlSheet.Cells(i, 6) = "=IF(E" & i & "=0,0,D" & i & ")" : xlSheet.Cells(i, 8) = "=G" & i & "*$E$5"
- If i = 8 Then : xlSheet.Cells(i, 7) = "=IF(E" & i & "=0,C" & i & ",0)"
- Else : xlSheet.Cells(i, 7) = "=IF(J" & i & "=0,IF(E" & i & "=0,C" & i & ",0),0)" : End If
- xlSheet.Cells(i, 10) = "=IF(J" & i - 1 & "=1,1,IF(And(D" & i & "<>0,F" & i & "<>0),1,0))"
- Next
- xlSheet.Cells(13, 1) = "Total" : xlSheet.Cells(13, 4) = "=D12+D11+D10+D9+D8" : xlSheet.Cells(13, 5) = "=E8+E9+E10+E11+E12"
- xlSheet.Cells(13, 6) = "=F8+F9+F10+F11+F12" : xlSheet.Cells(13, 7) = "=G8+G9+G10+G11+G12" : xlSheet.Cells(13, 8) = "=H8+H9+H10+H11+H12"
- xlSheet.Cells(15, 2) = "本期估驗 Nominal Tagihan" & vbCrLf & "(未稅Belum Termasuk Pajak)" : xlSheet.Cells(15, 3) = "' : "
- xlSheet.Cells(15, 4) = "=F13" : xlSheet.Cells(16, 2) = "PPN " & Strings.Format(稅金_nud.Value, "#,##0.0") & "%" : xlSheet.Cells(16, 3) = "' : "
- xlSheet.Cells(16, 4) = 請款總額_nud.Value - 請款金額_nud.Value : xlSheet.Cells(17, 4) = "=D15+D16"
- xlSheet.Cells(18, 2) = "本期請款金額 Total Tagihan : Rp" : xlSheet.Cells(18, 3) = "' : " : xlSheet.Cells(18, 4) = "=D17"
- xlSheet.Cells(18, 7) = "元整" : xlSheet.Cells(18, 8) = "(含稅) Termasuk Ppn" : xlSheet.Cells(21, 2) = 客戶名稱_tb.Text
- xlSheet.Cells(22, 2) = "驗收代表人" : BB(xlApp, xlSheet)
- Else
- xlSheet.Cells(8, 1) = "1" : xlSheet.Cells(8, 2) = "Prepayments" & vbCrLf & "(預付款)" : xlSheet.Cells(8, 3) = 工程款1_nud.Value / 100
- If 請款期數_cb.Text = "一" Then : xlSheet.Cells(8, 5) = "=C8" : Else : xlSheet.Cells(8, 5) = "0" : End If
- xlSheet.Cells(9, 1) = "2" : xlSheet.Cells(9, 2) = "Material Cost Application" & vbCrLf & "(材料到貨款)" : xlSheet.Cells(9, 3) = 工程款2_nud.Value / 100
- If 請款期數_cb.Text = "二" Then : xlSheet.Cells(9, 5) = "=C9" : Else : xlSheet.Cells(9, 5) = "0" : End If
- xlSheet.Cells(10, 1) = "3" : xlSheet.Cells(10, 2) = "Installation Fee & Final Application" & vbCrLf & "(施工.驗收款)"
- '----------特別調整------------------------------------------------------------------------------------------
- If 工程款5_nud.Value = 0 Then : xlSheet.Cells(10, 3) = 工程款3_nud.Value / 100
- Else : xlSheet.Cells(10, 3) = 工程款4_nud.Value / 100 + 工程款3_nud.Value / 100 : End If
- If 請款期數_cb.Text = "三" Or 請款期數_cb.Text = "四" Then : xlSheet.Cells(10, 5) = "=C10" : Else : xlSheet.Cells(10, 5) = "0" : End If
- xlSheet.Cells(11, 1) = "4" : xlSheet.Cells(11, 2) = "Assure" & vbCrLf & "(保留款)"
- '----------特別調整------------------------------------------------------------------------------------------
- If 工程款5_nud.Value = 0 Then : xlSheet.Cells(11, 3) = 工程款4_nud.Value / 100
- Else : xlSheet.Cells(11, 3) = 工程款5_nud.Value / 100 : End If
- If 請款期數_cb.Text = "四" Or 請款期數_cb.Text = "五" Then : xlSheet.Cells(11, 5) = "=C11" : Else : xlSheet.Cells(11, 5) = "0" : End If
- For i As Integer = 8 To 11
- If i = 10 Then : xlSheet.Cells(i, 4) = "=C" & i & "*$E$5 + " & ANUD3.Value : Else : xlSheet.Cells(i, 4) = "=C" & i & "*$E$5" : End If
- xlSheet.Cells(i, 6) = "=IF(E" & i & "=0,0,D" & i & ")" : xlSheet.Cells(i, 8) = "=G" & i & "*$E$5"
- If i = 8 Then : xlSheet.Cells(i, 7) = "=IF(E" & i & "=0,C" & i & ",0)"
- Else : xlSheet.Cells(i, 7) = "=IF(J" & i & "=0,IF(E" & i & "=0,C" & i & ",0),0)" : End If
- xlSheet.Cells(i, 10) = "=IF(J" & i - 1 & "=1,1,IF(And(D" & i & "<>0,F" & i & "<>0),1,0))"
- Next
- xlSheet.Cells(12, 1) = "Total" : xlSheet.Cells(12, 4) = "=D11+D10+D9+D8" : xlSheet.Cells(12, 5) = "=E8+E9+E10+E11"
- xlSheet.Cells(12, 6) = "=F8+F9+F10+F11" : xlSheet.Cells(12, 7) = "=G8+G9+G10+G11" : xlSheet.Cells(12, 8) = "=H8+H9+H10+H11"
- xlSheet.Cells(14, 2) = "本期估驗 Nominal Tagihan" & vbCrLf & "(未稅Belum Termasuk Pajak)" : xlSheet.Cells(14, 3) = "' : "
- xlSheet.Cells(14, 4) = "=F12" : xlSheet.Cells(16, 2) = "PPN " & Strings.Format(稅金_nud.Value, "#,##0.0") & "%" : xlSheet.Cells(15, 3) = "' : "
- xlSheet.Cells(15, 4) = 請款總額_nud.Value - 請款金額_nud.Value : xlSheet.Cells(16, 4) = "=D14+D15"
- xlSheet.Cells(17, 2) = "本期請款金額 Total Tagihan : Rp" : xlSheet.Cells(17, 3) = "' : " : xlSheet.Cells(17, 4) = "=D16"
- xlSheet.Cells(17, 7) = "元整" : xlSheet.Cells(17, 8) = "(含稅) Termasuk Ppn" : xlSheet.Cells(20, 2) = 客戶名稱_tb.Text
- xlSheet.Cells(21, 2) = "驗收代表人" : BB2(xlApp, xlSheet)
- End If
- Else
- DF = 0 : Dim HJ As Integer
- For i As Integer = 0 To 請款單_dgv.Rows.Count - 1
- xlSheet.Cells(8 + i, 1) = i + 1 : xlSheet.Cells(8 + i, 3) = CInt(請款單_dgv(表頭(7), i).Value.ToString()) / 100
- xlSheet.Cells(8 + i, 2) = "第" & i + 1 & "次請款" & vbCrLf & "The " & i + 1 & " Installment of The Project Funds"
- xlSheet.Cells(8 + i, 4) = "=C" & i + 8 & "*$E$5"
- If CInt(請款_tb.Text) = CInt(請款單_dgv("分期", i).Value.ToString()) Then
- xlSheet.Cells(8 + i, 5) = CInt(請款單_dgv(表頭(7), i).Value.ToString()) / 100
- FG = CInt(請款單_dgv(表頭(8), i).Value.ToString())
- GH = CInt(請款單_dgv(表頭(9), i).Value.ToString())
- Else
- xlSheet.Cells(8 + i, 5) = "0"
- End If
- xlSheet.Cells(8 + i, 6) = "=IF(E" & 8 + i & "=0,0,D" & 8 + i & ")"
- If i = 0 Then
- xlSheet.Cells(8 + i, 7) = "=IF(E" & 8 + i & "=0,C" & 8 + i & ",0)"
- Else
- xlSheet.Cells(8 + i, 7) = "=IF(J" & 8 + i & "=0,IF(E" & 8 + i & "=0,C" & 8 + i & ",0),0)"
- End If
- xlSheet.Cells(8 + i, 8) = "=G" & 8 + i & "*$E$5"
- xlSheet.Cells(8 + i, 10) = "=IF(J" & 7 + i & "=1,1,IF(AND(D" & 8 + i & "<>0,F" & 8 + i & "<>0),1,0))" : HJ = i
- Next
- If BNUD1.Value > 1000 Then : HJ += 1 : xlSheet.Cells(8 + HJ, 1) = HJ + 1 : xlSheet.Cells(8 + HJ, 2) = Label34.Text
- xlSheet.Cells(8 + HJ, 3) = BNUD1.Value / 金額6_und.Value : xlSheet.Cells(8 + HJ, 4) = "=C" & HJ + 8 & "*$E$5"
- xlSheet.Cells(8 + HJ, 5) = "0" : xlSheet.Cells(8 + HJ, 6) = "=IF(E" & 8 + HJ & "=0,0,D" & 8 + HJ & ")"
- xlSheet.Cells(8 + HJ, 7) = "=IF(J" & 8 + HJ & "=0,IF(E" & 8 + HJ & "=0,C" & 8 + HJ & ",0),0)" : xlSheet.Cells(8 + HJ, 8) = "=G" & 8 + HJ & "*$E$5"
- xlSheet.Cells(8 + HJ, 10) = "=IF(J" & 7 + HJ & "=1,1,IF(AND(D" & 8 + HJ & "<>0,F" & 8 + HJ & "<>0),1,0))"
- End If
- If BNUD2.Value > 1000 Then : HJ += 1 : xlSheet.Cells(8 + HJ, 1) = HJ + 1 : xlSheet.Cells(8 + HJ, 2) = Label33.Text
- xlSheet.Cells(8 + HJ, 3) = BNUD2.Value / 金額6_und.Value : xlSheet.Cells(8 + HJ, 4) = "=C" & HJ + 8 & "*$E$5"
- xlSheet.Cells(8 + HJ, 5) = "0" : xlSheet.Cells(8 + HJ, 6) = "=IF(E" & 8 + HJ & "=0,0,D" & 8 + HJ & ")"
- xlSheet.Cells(8 + HJ, 7) = "=IF(J" & 8 + HJ & "=0,IF(E" & 8 + HJ & "=0,C" & 8 + HJ & ",0),0)" : xlSheet.Cells(8 + HJ, 8) = "=G" & 8 + HJ & "*$E$5"
- xlSheet.Cells(8 + HJ, 10) = "=IF(J" & 7 + HJ & "=1,1,IF(AND(D" & 8 + HJ & "<>0,F" & 8 + HJ & "<>0),1,0))"
- End If
- If BNUD3.Value > 1000 Then : HJ += 1 : xlSheet.Cells(8 + HJ, 1) = HJ + 1 : xlSheet.Cells(8 + HJ, 2) = Label35.Text
- xlSheet.Cells(8 + HJ, 3) = BNUD3.Value / 金額6_und.Value : xlSheet.Cells(8 + HJ, 4) = "=C" & HJ + 8 & "*$E$5"
- xlSheet.Cells(8 + HJ, 5) = "0" : xlSheet.Cells(8 + HJ, 6) = "=IF(E" & 8 + HJ & "=0,0,D" & 8 + HJ & ")"
- xlSheet.Cells(8 + HJ, 7) = "=IF(J" & 8 + HJ & "=0,IF(E" & 8 + HJ & "=0,C" & 8 + HJ & ",0),0)" : xlSheet.Cells(8 + HJ, 8) = "=G" & 8 + HJ & "*$E$5"
- xlSheet.Cells(8 + HJ, 10) = "=IF(J" & 7 + HJ & "=1,1,IF(AND(D" & 8 + HJ & "<>0,F" & 8 + HJ & "<>0),1,0))"
- End If
- If BNUD4.Value > 1000 Then : HJ += 1 : xlSheet.Cells(8 + HJ, 1) = HJ + 1 : xlSheet.Cells(8 + HJ, 2) = Label31.Text
- xlSheet.Cells(8 + HJ, 3) = BNUD4.Value / 金額6_und.Value : xlSheet.Cells(8 + HJ, 4) = "=C" & HJ + 8 & "*$E$5"
- xlSheet.Cells(8 + HJ, 5) = "0" : xlSheet.Cells(8 + HJ, 6) = "=IF(E" & 8 + HJ & "=0,0,D" & 8 + HJ & ")"
- xlSheet.Cells(8 + HJ, 7) = "=IF(J" & 8 + HJ & "=0,IF(E" & 8 + HJ & "=0,C" & 8 + HJ & ",0),0)" : xlSheet.Cells(8 + HJ, 8) = "=G" & 8 + HJ & "*$E$5"
- xlSheet.Cells(8 + HJ, 10) = "=IF(J" & 7 + HJ & "=1,1,IF(AND(D" & 8 + HJ & "<>0,F" & 8 + HJ & "<>0),1,0))"
- End If
- If BNUD5.Value > 1000 Then : HJ += 1 : xlSheet.Cells(8 + HJ, 1) = HJ + 1 : xlSheet.Cells(8 + HJ, 2) = Label32.Text
- xlSheet.Cells(8 + HJ, 3) = BNUD5.Value / 金額6_und.Value : xlSheet.Cells(8 + HJ, 4) = "=C" & HJ + 8 & "*$E$5"
- xlSheet.Cells(8 + HJ, 5) = "0" : xlSheet.Cells(8 + HJ, 6) = "=IF(E" & 8 + HJ & "=0,0,D" & 8 + HJ & ")"
- xlSheet.Cells(8 + HJ, 7) = "=IF(J" & 8 + HJ & "=0,IF(E" & 8 + HJ & "=0,C" & 8 + HJ & ",0),0)" : xlSheet.Cells(8 + HJ, 8) = "=G" & 8 + HJ & "*$E$5"
- xlSheet.Cells(8 + HJ, 10) = "=IF(J" & 7 + HJ & "=1,1,IF(AND(D" & 8 + HJ & "<>0,F" & 8 + HJ & "<>0),1,0))"
- End If
- DF = 9 + HJ
- xlSheet.Cells(DF, 1) = "Total" : xlSheet.Cells(DF, 4) = "=SUM(D8:D" & DF - 1 & ")"
- xlSheet.Cells(DF, 5) = "=SUM(E8:E" & DF - 1 & ")" : xlSheet.Cells(DF, 6) = "=SUM(F8:F" & DF - 1 & ")"
- xlSheet.Cells(DF, 7) = "=SUM(G8:G" & DF - 1 & ")" : xlSheet.Cells(DF, 8) = "=SUM(H8:H" & DF - 1 & ")"
- xlSheet.Cells(DF + 2, 2) = "本期估驗 Nominal Tagihan" & vbCrLf & "(未稅Belum Termasuk Pajak)" : xlSheet.Cells(DF + 2, 3) = "' : "
- xlSheet.Cells(DF + 2, 4) = FG
- xlSheet.Cells(DF + 3, 2) = "PPN " & Strings.Format(稅金_nud.Value, "#,##0.0") & "%" : xlSheet.Cells(DF + 3, 3) = "' : "
- xlSheet.Cells(DF + 3, 4) = FG / 100 * GH
- xlSheet.Cells(DF + 4, 4) = "=SUM(D" & DF + 2 & "+D" & DF + 3
- xlSheet.Cells(DF + 5, 2) = "本期請款金額 Total Tagihan : Rp" : xlSheet.Cells(DF + 5, 3) = "' : " : xlSheet.Cells(DF + 5, 4) = "=D" & DF + 4
- xlSheet.Cells(DF + 5, 7) = "元整" : xlSheet.Cells(DF + 5, 8) = "(含稅) Termasuk Ppn" : xlSheet.Cells(DF + 7, 2) = 客戶名稱_tb.Text
- xlSheet.Cells(DF + 8, 2) = "驗收代表人" : BB3(xlApp, xlSheet)
- End If
- If Strings.Left(合約編號_tb.Text, 2) = "HX" Then : CC(xlApp, xlSheet) : Else : DD(xlApp, xlSheet) : End If : FF(xlApp, xlSheet)
- End If
-
- '----------------------------------------------------------------------------------------------------------------------
- If 主頁_ch.Checked = True Then
- xlSheet = NewMethod(xlBook) : xlApp.Sheets(1).Select : xlApp.Sheets(1).Name = "主頁"
- xlBook.Activate() : xlSheet.Activate()
- Dim BF As String : Dim CF As String
- If Strings.Left(合約編號_tb.Text, 2) = "HX" Then : BF = "PT HONG XHE INDUSTRIAL" & vbCrLf & "(鴻時工程有限公司)"
- Else : BF = "PT PUNCAK GEMILANG SEMESTA" & vbCrLf & "(鼎峰工程有限公司)" : End If
- If Label47.Text = 對話框(0) Then
- If 請款期數_cb.Text = "一" Then : CF = "第一次請款" & vbCrLf & "The First Installment of The Project Funds"
- ElseIf 請款期數_cb.Text = "二" Then : CF = "第二次請款" & vbCrLf & "The Second Installment of The Project Funds"
- ElseIf 請款期數_cb.Text = "三" Then : CF = "第三次請款" & vbCrLf & "The Third Installment of The Project Funds"
- ElseIf 請款期數_cb.Text = "四" Then : CF = "第四次請款" & vbCrLf & "The Fourth Installment of The Project Funds"
- ElseIf 請款期數_cb.Text = "五" Then : CF = "第五次請款" & vbCrLf & "The Fifth Installment of The Project Funds"
- End If
- Else
- If 請款_tb.Text = "1" Then : CF = "第一次請款" & vbCrLf & "The First Installment of The Project Funds"
- ElseIf 請款_tb.Text = "2" Then : CF = "第二次請款" & vbCrLf & "The Second Installment of The Project Funds"
- ElseIf 請款_tb.Text = "3" Then : CF = "第三次請款" & vbCrLf & "The Third Installment of The Project Funds"
- ElseIf 請款_tb.Text = "4" Then : CF = "第四次請款" & vbCrLf & "The Fourth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "5" Then : CF = "第五次請款" & vbCrLf & "The Fifth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "6" Then : CF = "第六次請款" & vbCrLf & "The Sixth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "7" Then : CF = "第七次請款" & vbCrLf & "The Seventh Installment of The Project Funds"
- ElseIf 請款_tb.Text = "8" Then : CF = "第八次請款" & vbCrLf & "The Eighth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "9" Then : CF = "第九次請款" & vbCrLf & "The Ninth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "10" Then : CF = "第十次請款" & vbCrLf & "The Tenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "11" Then : CF = "第十一次請款" & vbCrLf & "The Eleventh Installment of The Project Funds"
- ElseIf 請款_tb.Text = "12" Then : CF = "第十二次請款" & vbCrLf & "The Twelfth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "13" Then : CF = "第十三次請款" & vbCrLf & "The Thirteenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "14" Then : CF = "第十四次請款" & vbCrLf & "The Fourteenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "15" Then : CF = "第十五次請款" & vbCrLf & "The Fifteenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "16" Then : CF = "第十六次請款" & vbCrLf & "The Sixteenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "17" Then : CF = "第十七次請款" & vbCrLf & "The Seventeenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "18" Then : CF = "第十八次請款" & vbCrLf & "The Eighteenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "19" Then : CF = "第十九次請款" & vbCrLf & "The Nineteenth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "20" Then : CF = "第二十次請款" & vbCrLf & "The Twentieth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "21" Then : CF = "第二十一次請款" & vbCrLf & "The Twenty First Installment of The Project Funds"
- ElseIf 請款_tb.Text = "22" Then : CF = "第二十二次請款" & vbCrLf & "The Twenty Second Installment of The Project Funds"
- ElseIf 請款_tb.Text = "23" Then : CF = "第二十三次請款" & vbCrLf & "The Twenty Third Installment of The Project Funds"
- ElseIf 請款_tb.Text = "24" Then : CF = "第二十四次請款" & vbCrLf & "The Twenty Fourth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "25" Then : CF = "第二十五次請款" & vbCrLf & "The Twenty Fifth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "26" Then : CF = "第二十六次請款" & vbCrLf & "The Twenty Sixth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "27" Then : CF = "第二十七次請款" & vbCrLf & "The Twenty Seventh Installment of The Project Funds"
- ElseIf 請款_tb.Text = "28" Then : CF = "第二十八次請款" & vbCrLf & "The Twenty Eighth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "29" Then : CF = "第二十九次請款" & vbCrLf & "The Twenty Ninth Installment of The Project Funds"
- ElseIf 請款_tb.Text = "30" Then : CF = "第三十次請款" & vbCrLf & "The Thirtieth Installment of The Project Funds" : End If
- End If
- xlSheet.Cells(2, 1) = "工程款撥付申請表"
- xlSheet.Cells(3, 1) = "Form Request Pembayaran Proyek Pembangunan"
- xlSheet.Cells(4, 1) = "客戶名稱 : " & vbCrLf & "Client's Name" : xlSheet.Cells(4, 2) = 客戶名稱_tb.Text
- xlSheet.Cells(5, 1) = "工程名稱:" & vbCrLf & "Nama Proyek" : xlSheet.Cells(5, 2) = 工程名稱_中_tb.Text & vbCrLf & 工程名稱_英_tb.Text
- xlSheet.Cells(6, 1) = "施工合同號:" & vbCrLf & "No. Kontrak Konstruksi" : xlSheet.Cells(6, 2) = 合約編號_tb.Text
- xlSheet.Cells(7, 1) = "施工單位:" & vbCrLf & "Perusahaan Konstruksi" : xlSheet.Cells(7, 2) = BF
- xlSheet.Cells(8, 1) = "付款專案:" & vbCrLf & "Proyek Pembayaran" : xlSheet.Cells(8, 2) = CF
- xlSheet.Cells(8, 5) = "合同總額 (未稅):" & vbCrLf & "Jumlah Total Kontrak"
- If 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " Then
- xlSheet.Cells(8, 6) = Strings.Format(ANUD2.Value / 1.1, "#,##0")
- Else
- xlSheet.Cells(8, 6) = Strings.Format(ANUD2.Value / 1.11, "#,##0")
- End If
- xlSheet.Cells(9, 1) = "請款單位:" & vbCrLf & "Departemen Pemohon" : xlSheet.Cells(9, 2) = BF
- xlSheet.Cells(9, 5) = "要求付款日期:" & vbCrLf & "Permintaan Tanggal Pembayaran" : xlSheet.Cells(9, 6) = 付款期限_cb.Text
- xlSheet.Cells(10, 1) = "本次請款金額 (未稅):" & vbCrLf & "Total Tagihan" : xlSheet.Cells(10, 2) = Strings.Format(請款金額_nud.Value, "#,##0")
- xlSheet.Cells(10, 5) = "累計已收金額 (未稅):" & vbCrLf & "Akumulasi Biaya yang Diterima"
- Dim 已請 As Long
- For I As Integer = 0 To 請款單_dgv.Rows.Count - 1
- If Label47.Text = 對話框(0) Then
- If 請款期數_cb.Text = "一" Then : 已請 = 0
- ElseIf 請款期數_cb.Text = "二" Then
- If 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "一" Then : 已請 += 請款單_dgv.Rows(I).Cells(表頭(8)).Value
- End If
- ElseIf 請款期數_cb.Text = "三" Then
- If 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "一" Or 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "二" Then
- 已請 += 請款單_dgv.Rows(I).Cells(表頭(8)).Value
- End If
- ElseIf 請款期數_cb.Text = "四" Then
- If 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "一" Or 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "二" Or
- 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "三" Then : 已請 += 請款單_dgv.Rows(I).Cells(表頭(8)).Value
- End If
- ElseIf 請款期數_cb.Text = "五" Then
- If 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "一" Or 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "二" Or
- 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "三" Or 請款單_dgv.Rows(I).Cells(表頭(6)).Value.ToString = "四" Then
- 已請 += 請款單_dgv.Rows(I).Cells(表頭(8)).Value
- End If
- End If
- Else
- If CInt(請款_tb.Text) = 1 Then : 已請 = 0
- ElseIf CInt(請款單_dgv.Rows(I).Cells("分期").Value.ToString) < CInt(請款_tb.Text) Then
- 已請 += 請款單_dgv.Rows(I).Cells(表頭(8)).Value
- End If
- End If
- Next
- xlSheet.Cells(10, 6) = Strings.Format(已請, "#,##0")
-
- xlSheet.Cells(11, 1) = "本次請款內容:" & vbCrLf & "Deskripsi Tagihan" : xlSheet.Cells(11, 2) = 請款內容_tb.Text
- If 主頁明細_ch.Checked = True Then
- xlSheet.Cells(14, 2) = "合約金額(Contract Amount) : "
- If 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " Then
- xlSheet.Cells(14, 4) = Strings.Format(ANUD1.Value / 1.1, "#,##0")
- Else
- xlSheet.Cells(14, 4) = Strings.Format(ANUD1.Value / 1.11, "#,##0")
- End If : xlSheet.Cells(14, 5) = " RP (未稅)"
- xlSheet.Cells(15, 2) = "結算金額(Settlement Amount) : "
- If 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " Then
- xlSheet.Cells(15, 4) = Strings.Format(ANUD2.Value / 1.1, "#,##0")
- Else
- xlSheet.Cells(15, 4) = Strings.Format(ANUD2.Value / 1.11, "#,##0")
- End If : xlSheet.Cells(15, 5) = " RP (未稅)"
- xlSheet.Cells(16, 2) = "實際追加減(Add To) : "
- If 稅額顯示_lb.Text = "PPN 10%稅額 = Rp. " Then
- xlSheet.Cells(16, 4) = Strings.Format(ANUD3.Value / 1.1, "#,##0")
- Else
- xlSheet.Cells(16, 4) = Strings.Format(ANUD3.Value / 1.11, "#,##0")
- End If : xlSheet.Cells(16, 5) = " RP (未稅)"
- xlSheet.Cells(17, 2) = "已請款(Requested) : " : xlSheet.Cells(17, 4) = Strings.Format(已請, "#,##0") : xlSheet.Cells(17, 5) = " RP (未稅)"
- xlSheet.Cells(18, 2) = "剩餘款(Remaining) : " : xlSheet.Cells(18, 4) = "=D15-D17" : xlSheet.Cells(18, 5) = " RP (未稅)"
- xlSheet.Cells(19, 2) = "其中:"
- If 請款期數_cb.Text = "四" Then : xlSheet.Cells(20, 2) = "驗收款(Final acceptance) : " : Else : xlSheet.Cells(20, 2) = "未收款(Unpaid) : " : End If
- xlSheet.Cells(20, 4) = "=D15-D17-D21" : xlSheet.Cells(20, 5) = " RP (未稅)"
- xlSheet.Cells(21, 2) = "保留款(Assure) : " : xlSheet.Cells(21, 4) = "= D15 * " & 工程款5_nud.Value & "/ 100" : xlSheet.Cells(21, 5) = " RP (未稅)"
- End If
- xlSheet.Cells(23, 3) = "申請人 Pemohon:" : xlSheet.Cells(23, 4) = BF
- xlSheet.Cells(25, 3) = "申請時間 Waktu:" : xlSheet.Cells(25, 4) = Strings.Format(申請日期_dtp.Value, "yyyy/MM/dd")
- xlSheet.Cells(26, 1) = "籌建辦審批意見:" & vbCrLf & "Komentar Penyetuju Kantor Konstruksi Umum" : xlSheet.Cells(26, 2) = 其他意見_tb.Text
- xlSheet.Cells(36, 3) = "審核人 Disetujui oleh:" : xlSheet.Cells(37, 3) = "審核時間 Waktu:"
- xlSheet.Cells(39, 1) = "本表一式三份:施工單位、籌建辦、財務單位各一份。"
- xlSheet.Cells(40, 1) = "Form ini dirangkap 3 lembar: Perusahaan konstruksi, kantor konstruksi umum, departemen finance"
- AA(xlApp, xlSheet)
- If 甲方_tb.Text = "JCS" Then : JCS(xlApp, xlSheet) : ElseIf 甲方_tb.Text = "J2" Then : J2(xlApp, xlSheet) : Else
- If Strings.Left(合約編號_tb.Text, 2) = "HX" Then : CC(xlApp, xlSheet) : Else : DD(xlApp, xlSheet) : End If : FF(xlApp, xlSheet)
- End If
- End If
-
- Dim SERT As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
- '-------------轉換成PDF---------------------------------------------------------------------
- If 報告移交單_ch.Checked = True And 請款單_ch.Checked = True And 主頁_ch.Checked = True Then : xlApp.Sheets(4).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X1.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- xlBook.Sheets(2).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X2.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- xlBook.Sheets(3).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X3.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- Dim pdf1 As String = SERT & "\" & 合約編號_tb.Text & "_X1.pdf"
- Dim pdf2 As String = SERT & "\" & 合約編號_tb.Text & "_X2.pdf"
- Dim pdf3 As String = SERT & "\" & 合約編號_tb.Text & "_X3.pdf"
- Dim outputPDF As String = SERT & "\" & 合約編號_tb.Text & "請款單.pdf"
- Dim mergedDocument As New PdfDocument() ' 创建一个新的PDF文档对象
- Dim document1 As PdfDocument = PdfReader.Open(pdf1, PdfDocumentOpenMode.Import) ' 打开第一个PDF文件
- For Each page As PdfPage In document1.Pages : mergedDocument.AddPage(page) : Next ' 将第一个PDF文件的页面逐一添加到合并文档
- Dim document2 As PdfDocument = PdfReader.Open(pdf2, PdfDocumentOpenMode.Import) ' 打开第二个PDF文件
- For Each page As PdfPage In document2.Pages : mergedDocument.AddPage(page) : Next ' 将第二个PDF文件的页面逐一添加到合并文档
- Dim document3 As PdfDocument = PdfReader.Open(pdf3, PdfDocumentOpenMode.Import) ' 打开第三个PDF文件
- For Each page As PdfPage In document3.Pages : mergedDocument.AddPage(page) : Next ' 将第三个PDF文件的页面逐一添加到合并文档
- mergedDocument.Save(outputPDF) ' 保存合并后的PDF文件
- document1.Close() : document2.Close() : document3.Close() ' 关闭文档对象
- File.Delete(SERT & "\" & 合約編號_tb.Text & "_X1.pdf")
- File.Delete(SERT & "\" & 合約編號_tb.Text & "_X2.pdf")
- File.Delete(SERT & "\" & 合約編號_tb.Text & "_X3.pdf") ' 删除文件1和文件2
- ElseIf 報告移交單_ch.Checked = True And 請款單_ch.Checked = True And 主頁_ch.Checked = False Then : xlApp.Sheets(3).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X1.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- xlBook.Sheets(2).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X2.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- Dim pdf1 As String = SERT & "\" & 合約編號_tb.Text & "_X1.pdf" : Dim pdf2 As String = SERT & "\" & 合約編號_tb.Text & "_X2.pdf"
- Dim outputPDF As String = SERT & "\" & 合約編號_tb.Text & "請款單.pdf"
- Dim mergedDocument As New PdfDocument() ' 创建一个新的PDF文档对象
- Dim document1 As PdfDocument = PdfReader.Open(pdf1, PdfDocumentOpenMode.Import) ' 打开第一个PDF文件
- For Each page As PdfPage In document1.Pages : mergedDocument.AddPage(page) : Next ' 将第一个PDF文件的页面逐一添加到合并文档
- Dim document2 As PdfDocument = PdfReader.Open(pdf2, PdfDocumentOpenMode.Import) ' 打开第二个PDF文件
- For Each page As PdfPage In document2.Pages : mergedDocument.AddPage(page) : Next ' 将第二个PDF文件的页面逐一添加到合并文档
- mergedDocument.Save(outputPDF) ' 保存合并后的PDF文件
- document1.Close() : document2.Close() ' 关闭文档对象
- File.Delete(SERT & "\" & 合約編號_tb.Text & "_X1.pdf") : File.Delete(SERT & "\" & 合約編號_tb.Text & "_X2.pdf") ' 删除文件1和文件2
- ElseIf 報告移交單_ch.Checked = True And 請款單_ch.Checked = False And 主頁_ch.Checked = True Then : xlApp.Sheets(3).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X1.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- xlBook.Sheets(2).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X2.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- Dim pdf1 As String = SERT & "\" & 合約編號_tb.Text & "_X1.pdf" : Dim pdf2 As String = SERT & "\" & 合約編號_tb.Text & "_X2.pdf"
- Dim outputPDF As String = SERT & "\" & 合約編號_tb.Text & "請款單.pdf"
- Dim mergedDocument As New PdfDocument() ' 创建一个新的PDF文档对象
- Dim document1 As PdfDocument = PdfReader.Open(pdf1, PdfDocumentOpenMode.Import) ' 打开第一个PDF文件
- For Each page As PdfPage In document1.Pages : mergedDocument.AddPage(page) : Next ' 将第一个PDF文件的页面逐一添加到合并文档
- Dim document2 As PdfDocument = PdfReader.Open(pdf2, PdfDocumentOpenMode.Import) ' 打开第二个PDF文件
- For Each page As PdfPage In document2.Pages : mergedDocument.AddPage(page) : Next ' 将第二个PDF文件的页面逐一添加到合并文档
- mergedDocument.Save(outputPDF) ' 保存合并后的PDF文件
- document1.Close() : document2.Close() ' 关闭文档对象
- File.Delete(SERT & "\" & 合約編號_tb.Text & "_X1.pdf") : File.Delete(SERT & "\" & 合約編號_tb.Text & "_X2.pdf") ' 删除文件1和文件2
- ElseIf 報告移交單_ch.Checked = False And 請款單_ch.Checked = True And 主頁_ch.Checked = True Then : xlApp.Sheets(3).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X1.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- xlBook.Sheets(2).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "_X2.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- Dim pdf1 As String = SERT & "\" & 合約編號_tb.Text & "_X1.pdf" : Dim pdf2 As String = SERT & "\" & 合約編號_tb.Text & "_X2.pdf"
- Dim outputPDF As String = SERT & "\" & 合約編號_tb.Text & "請款單.pdf"
- Dim mergedDocument As New PdfDocument() ' 创建一个新的PDF文档对象
- Dim document1 As PdfDocument = PdfReader.Open(pdf1, PdfDocumentOpenMode.Import) ' 打开第一个PDF文件
- For Each page As PdfPage In document1.Pages : mergedDocument.AddPage(page) : Next ' 将第一个PDF文件的页面逐一添加到合并文档
- Dim document2 As PdfDocument = PdfReader.Open(pdf2, PdfDocumentOpenMode.Import) ' 打开第二个PDF文件
- For Each page As PdfPage In document2.Pages : mergedDocument.AddPage(page) : Next ' 将第二个PDF文件的页面逐一添加到合并文档
- mergedDocument.Save(outputPDF) ' 保存合并后的PDF文件
- document1.Close() : document2.Close() ' 关闭文档对象
- File.Delete(SERT & "\" & 合約編號_tb.Text & "_X1.pdf") : File.Delete(SERT & "\" & 合約編號_tb.Text & "_X2.pdf") ' 删除文件1和文件2
- ElseIf 報告移交單_ch.Checked = True And 請款單_ch.Checked = False And 主頁_ch.Checked = False Then : xlApp.Sheets(2).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "報告移交單.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- ElseIf 報告移交單_ch.Checked = False And 請款單_ch.Checked = True And 主頁_ch.Checked = False Then : xlApp.Sheets(2).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "請款明細表.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- ElseIf 報告移交單_ch.Checked = False And 請款單_ch.Checked = False And 主頁_ch.Checked = True Then : xlApp.Sheets(2).Delete
- xlBook.Sheets(1).ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, SERT & "\" & 合約編號_tb.Text & "工程款撥付申請表.pdf", XlFixedFormatQuality.xlQualityStandard, True)
- End If
- '-------------關閉EXCEL---------------------------------------------------------------------
- xlSheet.PageSetup.PrintArea = "" : xlApp.Cells.Select()
- xlApp.Application.WindowState = xlMinimized
- xlBook.Close(False)
- Runtime.InteropServices.Marshal.ReleaseComObject(xlSheet)
- Runtime.InteropServices.Marshal.ReleaseComObject(xlBook)
- Runtime.InteropServices.Marshal.ReleaseComObject(xlApp)
- xlApp.Quit() : xlSheet = Nothing : xlBook = Nothing : xlApp = Nothing : GC.Collect()
- '-------------開啟PDF---------------------------------------------------------------------
- Dim pdfFilePath As String
- If 報告移交單_ch.Checked = True And 請款單_ch.Checked = False And 主頁_ch.Checked = False Then
- pdfFilePath = SERT & "\" & 合約編號_tb.Text & "報告移交單.pdf"
- ElseIf 報告移交單_ch.Checked = False And 請款單_ch.Checked = True And 主頁_ch.Checked = False Then
- pdfFilePath = SERT & "\" & 合約編號_tb.Text & "請款明細表.pdf"
- ElseIf 報告移交單_ch.Checked = False And 請款單_ch.Checked = False And 主頁_ch.Checked = True Then
- pdfFilePath = SERT & "\" & 合約編號_tb.Text & "工程款撥付申請表.pdf"
- Else
- pdfFilePath = SERT & "\" & 合約編號_tb.Text & "請款單.pdf"
- End If
- If IsChromeInstalled() Then
- Try
- Dim chromeProcess As New Process()
- chromeProcess.StartInfo.FileName = "chrome"
- chromeProcess.StartInfo.Arguments = """" & pdfFilePath & """"
- chromeProcess.Start()
- Catch ex As Exception
- End Try
- Else
- Try
- System.Diagnostics.Process.Start("""" & pdfFilePath & """")
- Catch ex As Exception
- End Try
- End If
- MGB(系統語言字典("H508-121-" & 語言), 1)
- Catch ex As Exception
- MGB(ex.Message, 1)
- End Try
- End If
- End If
- End If
- End If
- End If
- End Sub
- ' 檢查系統是否已安裝 Google Chrome
- Private Function IsChromeInstalled() As Boolean
- Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
- If key IsNot Nothing Then
- For Each subkeyName As String In key.GetSubKeyNames()
- Dim subkey As Microsoft.Win32.RegistryKey = key.OpenSubKey(subkeyName)
- Dim displayName As Object = subkey.GetValue("DisplayName")
-
- If displayName IsNot Nothing AndAlso displayName.ToString().Contains("Google Chrome") Then
- Return True
- End If
- Next
- End If
- Return False
- End Function
- Private Sub 客戶名稱_tb_Click(sender As Object, e As EventArgs) Handles 客戶名稱_tb.Click
- CB選擇清單(客戶名稱_tb)
- End Sub
- Private Sub 付款期限_cb_Click(sender As Object, e As EventArgs) Handles 付款期限_cb.Click
- CB選擇清單(付款期限_cb)
- End Sub
-
- Private Shared Function NewMethod(xlBook As Workbook) As Worksheet
- Return CType(xlBook.Worksheets.Add, Worksheet)
- End Function
- Private Sub AA(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- xlSheet.Cells.Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 95
- xlSheet.Rows("2:3").Select
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 18 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 30 : xlSheet.Columns("B:D").Select : myExcel.Selection.ColumnWidth = 15
- xlSheet.Columns("E:E").Select : myExcel.Selection.ColumnWidth = 30 : xlSheet.Columns("F:F").Select : myExcel.Selection.ColumnWidth = 15
-
- xlSheet.Rows("4:7").Select : myExcel.Selection.RowHeight = 40
- xlSheet.Range("B4:F4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("B5:F5").Select() : With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("B6:F6").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("B7:F7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A2:F2").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("A3:F3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Rows("8:10").Select : myExcel.Selection.RowHeight = 40
- xlSheet.Range("B8:D8").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("B9:D9").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("B10:D10").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("F8:F10").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("B11:F12").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlTop : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A11:A25").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D24:F24").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Rows("24:24").Select : myExcel.Selection.RowHeight = 13.5
- xlSheet.Range("C24").Select()
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("C25").Select()
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("D25").Select()
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Rows("26:26").Select : myExcel.Selection.RowHeight = 13.5
- xlSheet.Range("A26:A37").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlTop : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A11:A25").Select()
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlTop : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("B26:F35").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlTop : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("C36").Select()
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("C37").Select()
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
-
- xlSheet.Range("A4:F10").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- xlSheet.Range("B11:F25").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A11:A25").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A26:A37").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("B26:F37").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A4:F37").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- xlSheet.Range("A38:F41").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- myExcel.ActiveWindow.DisplayGridlines = False
- xlSheet.Range("D23:F24").Select()
- With myExcel.Selection : .HorizontalAlignment = xlGeneral : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.UnMerge
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("D21").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("I6").Select()
- End Sub
- Private Sub BB(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- xlSheet.Cells.Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Range("D15:F18").Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 14 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 5 : xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 40
- xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("D:D").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("E:E").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("F:F").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("G:G").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("I:I").Select : myExcel.Selection.ColumnWidth = 10
- xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 95 : xlSheet.Rows("3:3").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("4:4").Select : myExcel.Selection.RowHeight = 50 : xlSheet.Rows("5:5").Select : myExcel.Selection.RowHeight = 25
- xlSheet.Rows("7:7").Select : myExcel.Selection.RowHeight = 40 : xlSheet.Rows("8:12").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("13:13").Select : myExcel.Selection.RowHeight = 30 : xlSheet.Rows("14:21").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("23:23").Select : myExcel.Selection.RowHeight = 120
-
- xlSheet.Range("A2:I2").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 22 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- myExcel.Selection.Font.Underline = xlUnderlineStyleSingle
- xlSheet.Range("A3:G3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("H3:I3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A4:G4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- With myExcel.Selection : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
- .ReadingOrder = xlContext : End With
- xlSheet.Range("H4:I4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A5:D5").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("E5:I5").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("E7:F7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("G7:H7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("A7:I7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : End With
- xlSheet.Range("A8:A12").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("A8:B12").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("C8:C12").Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("E8:E13").Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("G8:G13").Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("D8:D18").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("F8:F13").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("H8:H13").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("A13:C13").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B15:B16").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("D15:E15").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D16:E16").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D17:E17").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D18:F18").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B21:D21").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B22:D22").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
-
- xlSheet.Range("A3:I4").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A5:I5").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A7:I7").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("A8:I12").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("A13:I13").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("B16:E16").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("D18:F18").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
-
- xlSheet.Range("A14:I23").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- xlSheet.Range("J16").Select() : myExcel.ActiveWindow.DisplayGridlines = False
- xlSheet.Range("C7:D12").Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : End With
- xlSheet.Range("D13").Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : End With
- xlSheet.Range("E7:F13").Select() : With myExcel.Selection.Font : .Color = -16776961 : .TintAndShade = 0 : End With
- xlSheet.Range("G7:H13").Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0 : End With
- xlSheet.Range("A7:I13").Select() : myExcel.Selection.Font.Bold = True
- xlSheet.Columns("J:J").Select : With myExcel.Selection.Font : .ThemeColor = xlThemeColorDark1 : .TintAndShade = 0 : End With
- xlSheet.Columns("J:J").Select : myExcel.Selection.ColumnWidth = 0.5
- End Sub
- Private Sub BB2(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- xlSheet.Cells.Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Range("D14:F17").Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 14 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 5 : xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 40
- xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("D:D").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("E:E").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("F:F").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("G:G").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("I:I").Select : myExcel.Selection.ColumnWidth = 10
- xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 95 : xlSheet.Rows("3:3").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("4:4").Select : myExcel.Selection.RowHeight = 50 : xlSheet.Rows("5:5").Select : myExcel.Selection.RowHeight = 25
- xlSheet.Rows("7:7").Select : myExcel.Selection.RowHeight = 40 : xlSheet.Rows("8:11").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("12:12").Select : myExcel.Selection.RowHeight = 30 : xlSheet.Rows("13:20").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("22:22").Select : myExcel.Selection.RowHeight = 120
-
- xlSheet.Range("A2:I2").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 22 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- myExcel.Selection.Font.Underline = xlUnderlineStyleSingle
- xlSheet.Range("A3:G3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("H3:I3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A4:G4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- With myExcel.Selection : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
- .ReadingOrder = xlContext : End With
- xlSheet.Range("H4:I4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A5:D5").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("E5:I5").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("E7:F7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("G7:H7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("A7:I7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : End With
- xlSheet.Range("A8:A11").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("A8:B11").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("C8:C11").Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("E8:E12").Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("G8:G12").Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("D8:D17").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("F8:F12").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("H8:H12").Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("A12:C12").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B14:B15").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("D14:E14").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D15:E15").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D16:E16").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D17:F17").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B20:D20").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B21:D21").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
-
- xlSheet.Range("A3:I4").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A5:I5").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A7:I7").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("A8:I11").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("A12:I12").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("B15:E15").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("D17:F17").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
-
- xlSheet.Range("A13:I22").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- xlSheet.Range("J16").Select() : myExcel.ActiveWindow.DisplayGridlines = False
- xlSheet.Range("C7:D11").Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : End With
- xlSheet.Range("D12").Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : End With
- xlSheet.Range("E7:F12").Select() : With myExcel.Selection.Font : .Color = -16776961 : .TintAndShade = 0 : End With
- xlSheet.Range("G7:H12").Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0 : End With
- xlSheet.Range("A7:I12").Select() : myExcel.Selection.Font.Bold = True
- xlSheet.Columns("J:J").Select : With myExcel.Selection.Font : .ThemeColor = xlThemeColorDark1 : .TintAndShade = 0 : End With
- xlSheet.Columns("J:J").Select : myExcel.Selection.ColumnWidth = 0.5
- End Sub
- Private Sub BB3(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- xlSheet.Cells.Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Range("D" & DF + 2 & ":F" & DF + 5 & "").Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 14 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 5 : xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 40
- xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("D:D").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("E:E").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("F:F").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("G:G").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 17
- xlSheet.Columns("I:I").Select : myExcel.Selection.ColumnWidth = 10
- xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 95 : xlSheet.Rows("3:3").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows("4:4").Select : myExcel.Selection.RowHeight = 50 : xlSheet.Rows("5:5").Select : myExcel.Selection.RowHeight = 25
- xlSheet.Rows("7:7").Select : myExcel.Selection.RowHeight = 40 : xlSheet.Rows("8:" & DF - 1).Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows(DF & ":" & DF).Select : myExcel.Selection.RowHeight = 30 : xlSheet.Rows(DF + 1 & ":" & DF + 8).Select : myExcel.Selection.RowHeight = 30
- xlSheet.Rows(DF + 10 & ":" & DF + 10).Select : myExcel.Selection.RowHeight = 120
-
- xlSheet.Range("A2:I2").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 22 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- myExcel.Selection.Font.Underline = xlUnderlineStyleSingle
- xlSheet.Range("A3:G3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("H3:I3").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A4:G4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- With myExcel.Selection : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
- .ReadingOrder = xlContext : End With
- xlSheet.Range("H4:I4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A5:D5").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("E5:I5").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("E7:F7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("G7:H7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("A7:I7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : End With
- xlSheet.Range("A8:A" & DF - 1).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("A8:B" & DF - 1).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("C8:C" & DF - 1).Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("E8:E" & DF).Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("G8:G" & DF).Select() : myExcel.Selection.Style = "Percent"
- xlSheet.Range("D8:D" & DF + 5).Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("F8:F" & DF).Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("H8:H" & DF).Select() : myExcel.Selection.NumberFormatLocal = "#,##0"
- xlSheet.Range("A" & DF & ":C" & DF).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B" & DF + 2 & ":B" & DF + 3).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("D" & DF + 2 & ":E" & DF + 2).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D" & DF + 3 & ":E" & DF + 3).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D" & DF + 4 & ":E" & DF + 4).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("D" & DF + 5 & ":F" & DF + 5).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B" & DF + 8 & ":D" & DF + 8).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- xlSheet.Range("B" & DF + 9 & ":D" & DF + 9).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
-
- xlSheet.Range("A3:I4").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A5:I5").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("A7:I7").Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("A8:I" & DF - 1).Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("A" & DF & ":I" & DF).Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- xlSheet.Range("B" & DF + 3 & ":E" & DF + 3).Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
- xlSheet.Range("D" & DF + 5 & ":F" & DF + 5).Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
-
- xlSheet.Range("A" & DF + 1 & ":I" & DF + 10).Select()
- myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
- With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
- myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
- xlSheet.Range("J" & DF + 3).Select() : myExcel.ActiveWindow.DisplayGridlines = False
- xlSheet.Range("C7:D" & DF - 1).Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : End With
- xlSheet.Range("D" & DF).Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : End With
- xlSheet.Range("E7:F" & DF).Select() : With myExcel.Selection.Font : .Color = -16776961 : .TintAndShade = 0 : End With
- xlSheet.Range("G7:H" & DF).Select() : With myExcel.Selection.Font : .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0 : End With
- xlSheet.Range("A7:I" & DF).Select() : myExcel.Selection.Font.Bold = True
- xlSheet.Columns("J:J").Select : With myExcel.Selection.Font : .ThemeColor = xlThemeColorDark1 : .TintAndShade = 0 : End With
- xlSheet.Columns("J:J").Select : myExcel.Selection.ColumnWidth = 0.5
- xlSheet.Range("B" & DF + 2 & ":B" & DF + 5).Select()
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- xlSheet.Range("B" & DF + 7 & ":D" & DF + 7).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False
- .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
- End With : myExcel.Selection.Merge
- End Sub
- Private Sub AB(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- Dim 位置 As String
- xlSheet.Cells.Select()
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 12 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 5 : xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 30
- xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 3 : xlSheet.Columns("D:E").Select : myExcel.Selection.ColumnWidth = 40
- xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 95
- xlSheet.Range("A2:E2").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 18 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
- .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
- myExcel.Selection.Font.Underline = xlUnderlineStyleSingle
- xlSheet.Range("A4:E4").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A6:B6").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("C6:E6").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A7:B7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Rows("7:7").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Range("C7:E7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A9:E9").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A6:B7").Select()
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : End With
- xlSheet.Range("A11:B11").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A12:B12").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("C11:E11").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Rows("12:12").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Range("C12:E12").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- xlSheet.Range("A14:E14").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
-
- If 請款期數_cb.Text = "四" Then : 位置 = "D16:D21" : Else : 位置 = "D16:D20" : End If : xlSheet.Range(位置).Select()
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- If 請款期數_cb.Text = "四" Then : 位置 = "C16:C21" : Else : 位置 = "C16:C20" : End If : xlSheet.Range(位置).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- If 請款期數_cb.Text = "四" Then
- xlSheet.Rows("23:23").Select : myExcel.Selection.RowHeight = 30
- xlSheet.Range("A23:E23").Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- Else : End If
- If 請款期數_cb.Text = "四" Then
- xlSheet.Rows("24:24").Select : myExcel.Selection.RowHeight = 30 : 位置 = "A24:E24" : xlSheet.Range(位置).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- Else
- xlSheet.Rows("22:22").Select : myExcel.Selection.RowHeight = 30 : 位置 = "A22:E22" : xlSheet.Range(位置).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
- .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- End If
- If 請款期數_cb.Text = "四" Then : 位置 = "A25:E25" : Else : 位置 = "A23:E23" : End If : xlSheet.Range(位置).Select()
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
-
- If 請款期數_cb.Text = "四" Then : xlSheet.Range("D27").Select() : Else : xlSheet.Range("D25").Select() : End If
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- If 請款期數_cb.Text = "四" Then : xlSheet.Range("E27").Select() : Else : xlSheet.Range("E25").Select() : End If
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- If 請款期數_cb.Text = "四" Then : xlSheet.Range("E29:E31").Select() : Else : xlSheet.Range("E27:E29").Select() : End If
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- If 請款期數_cb.Text = "四" Then : xlSheet.Range("B31:D31").Select() : Else : xlSheet.Range("B29:D29").Select() : End If
- With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
- With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True : End With
- If 請款期數_cb.Text = "四" Then : xlSheet.Range("B30").Select() : Else : xlSheet.Range("B28").Select() : End If
- With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
- .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
- If 請款期數_cb.Text = "四" Then : xlSheet.Rows("32:32").Select : Else : xlSheet.Rows("30:30").Select : End If : myExcel.Selection.RowHeight = 100
- myExcel.ActiveWindow.DisplayGridlines = False
- End Sub
- Private Sub CC(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- Clipboard.SetDataObject(PictureBox1.Image)
- xlSheet.Range("A1").Select()
- myExcel.ActiveSheet.Pictures.Paste.Select
- myExcel.Selection.ShapeRange.Height = 93
- myExcel.Selection.ShapeRange.IncrementLeft(0)
- myExcel.Selection.ShapeRange.IncrementTop(0)
- End Sub
- Private Sub DD(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- Clipboard.SetDataObject(PictureBox2.Image)
- xlSheet.Range("A1").Select()
- myExcel.ActiveSheet.Pictures.Paste.Select
- myExcel.Selection.ShapeRange.Height = 93
- myExcel.Selection.ShapeRange.IncrementLeft(0)
- myExcel.Selection.ShapeRange.IncrementTop(0)
- End Sub
- Private Sub JCS(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- Clipboard.SetDataObject(JCS_PB.Image)
- xlSheet.Range("A1").Select()
- myExcel.ActiveSheet.Pictures.Paste.Select
- myExcel.Selection.ShapeRange.Height = 93
- myExcel.Selection.ShapeRange.IncrementLeft(0)
- myExcel.Selection.ShapeRange.IncrementTop(0)
- End Sub
- Private Sub J2(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- Clipboard.SetDataObject(J2_PB.Image)
- xlSheet.Range("A1").Select()
- myExcel.ActiveSheet.Pictures.Paste.Select
- myExcel.Selection.ShapeRange.Height = 93
- myExcel.Selection.ShapeRange.IncrementLeft(0)
- myExcel.Selection.ShapeRange.IncrementTop(0)
- End Sub
- Private Sub FF(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
- If Strings.Left(合約編號_tb.Text, 2) = "HX" Then
- myExcel.ActiveSheet.PageSetup.CenterHeaderPicture.Filename =
- Str01 & "\HXBWLOG.png"
- Else
- myExcel.ActiveSheet.PageSetup.CenterHeaderPicture.Filename =
- Str01 & "\PGSBWLOG.png"
- End If
- myExcel.Application.PrintCommunication = False : With myExcel.ActiveSheet.PageSetup : .PrintTitleRows = "" : .PrintTitleColumns = "" : End With
- myExcel.Application.PrintCommunication = True : myExcel.ActiveSheet.PageSetup.PrintArea = "" : myExcel.Application.PrintCommunication = False
- With myExcel.ActiveSheet.PageSetup : .LeftHeader = ""
- .CenterHeader = "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "&G"
- .RightHeader = "" : .LeftFooter = "" : .CenterFooter = "第 &P 頁,共 &N 頁" : .RightFooter = ""
- .LeftMargin = myExcel.Application.InchesToPoints(0.236220472440945) : .RightMargin = myExcel.Application.InchesToPoints(0.236220472440945)
- .TopMargin = myExcel.Application.InchesToPoints(0.748031496062992) : .BottomMargin = myExcel.Application.InchesToPoints(0.748031496062992)
- .HeaderMargin = myExcel.Application.InchesToPoints(0.31496062992126) : .FooterMargin = myExcel.Application.InchesToPoints(0.31496062992126)
- .PrintHeadings = False : .PrintGridlines = False : .CenterHorizontally = True : .CenterVertically = False : .Draft = False
- .FirstPageNumber = xlAutomatic : .BlackAndWhite = False : .Zoom = False : .FitToPagesWide = 1 : .FitToPagesTall = False : .OddAndEvenPagesHeaderFooter = False
- .DifferentFirstPageHeaderFooter = False : .ScaleWithDocHeaderFooter = True : .AlignMarginsHeaderFooter = True
- .EvenPage.LeftHeader.Text = "" : .EvenPage.CenterHeader.Text = "" : .EvenPage.RightHeader.Text = "" : .EvenPage.LeftFooter.Text = ""
- .EvenPage.CenterFooter.Text = "" : .EvenPage.RightFooter.Text = "" : .FirstPage.LeftHeader.Text = "" : .FirstPage.CenterHeader.Text = ""
- .FirstPage.RightHeader.Text = "" : .FirstPage.LeftFooter.Text = "" : .FirstPage.CenterFooter.Text = "" : .FirstPage.RightFooter.Text = ""
- End With : myExcel.Application.PrintCommunication = True
- End Sub
-
- Private Sub 風格()
- If 深色風格 = False Then
- Me.BackColor = SystemColors.Control : Label11.BackColor = SystemColors.Control : Label2.BackColor = SystemColors.Control
- Label5.BackColor = SystemColors.Control : Label40.BackColor = SystemColors.Control : TabPage5.BackColor = SystemColors.Control
- TabPage6.BackColor = SystemColors.Control : TabPage7.BackColor = SystemColors.Control : TabPage8.BackColor = SystemColors.Control
- TabPage9.BackColor = SystemColors.Control
-
- Label7.ForeColor = Color.Black : Label11.ForeColor = Color.Black : Label24.ForeColor = Color.Black : Label18.ForeColor = Color.Black
- Label23.ForeColor = Color.Black : Label17.ForeColor = Color.Black : Label13.ForeColor = Color.Black : Label16.ForeColor = Color.Black
- Label20.ForeColor = Color.Black : Label14.ForeColor = Color.Black : Label12.ForeColor = Color.Black : Label15.ForeColor = Color.Black
- Label2.ForeColor = Color.Black : Label5.ForeColor = Color.Black : Label19.ForeColor = Color.Black : Label40.ForeColor = Color.Black
- Label45.ForeColor = Color.Black : Label46.ForeColor = Color.Black : Label41.ForeColor = Color.Black : Label38.ForeColor = Color.Black
- Label43.ForeColor = Color.Black : Label44.ForeColor = Color.Black : Label414.ForeColor = Color.Black : Label42.ForeColor = Color.Black
- Label39.ForeColor = Color.Black : 主頁_ch.ForeColor = Color.Black : 主頁明細_ch.ForeColor = Color.Black : 請款單_ch.ForeColor = Color.Black
- 報告移交單_ch.ForeColor = Color.Black : 新版_ch.ForeColor = Color.Black : Label3.ForeColor = Color.Black : Label1.ForeColor = Color.Black
- Label372.ForeColor = Color.FromArgb(192, 0, 0) : Label375.ForeColor = Color.FromArgb(192, 0, 0) : Label378.ForeColor = Color.FromArgb(192, 0, 0)
- CH1.ForeColor = Color.Green : 稅額顯示_lb.ForeColor = Color.Green : CH2.ForeColor = Color.Green : Label390.ForeColor = Color.Green
- Label389.ForeColor = Color.Green : Label388.ForeColor = Color.Green : Label387.ForeColor = Color.Green : Label386.ForeColor = Color.Green
- Label21.ForeColor = Color.Green : Label8.ForeColor = Color.Green : Label6.ForeColor = Color.Green : Label9.ForeColor = Color.Green
- Label37.ForeColor = Color.Blue : Label27.ForeColor = Color.Blue : Label26.ForeColor = Color.Blue : Label28.ForeColor = Color.Blue
- Label29.ForeColor = Color.Blue : Label30.ForeColor = Color.Blue : Label36.ForeColor = Color.Blue : Label34.ForeColor = Color.Blue
- Label33.ForeColor = Color.Blue : Label35.ForeColor = Color.Blue : Label31.ForeColor = Color.Blue : Label32.ForeColor = Color.Blue
- Label4.ForeColor = Color.Black
-
- 關鍵字搜尋_tb.BackColor = Color.White : 關鍵字搜尋_tb.ForeColor = Color.Black : 合約編號_tb.BackColor = Color.White : 合約編號_tb.ForeColor = Color.Black
- 客戶名稱_tb.BackColor = Color.White : 客戶名稱_tb.ForeColor = Color.Black : 工程名稱_中_tb.BackColor = Color.White : 工程名稱_中_tb.ForeColor = Color.Black
- 工程名稱_英_tb.BackColor = Color.White : 工程名稱_英_tb.ForeColor = Color.Black : 附錄編號_tb.BackColor = Color.White : 附錄編號_tb.ForeColor = Color.Black
- 請款單號_tb.BackColor = Color.White : 請款單號_tb.ForeColor = Color.Black : 請款期數_cb.BackColor = Color.White : 請款期數_cb.ForeColor = Color.Black
- 付款期限_cb.BackColor = Color.White : 付款期限_cb.ForeColor = Color.Black : 請款內容_tb.BackColor = Color.White : 請款內容_tb.ForeColor = Color.Black
- 其他意見_tb.BackColor = Color.White : 其他意見_tb.ForeColor = Color.Black
- NUD1.BackColor = Color.White : NUD1.ForeColor = Color.Black : NUD2.BackColor = Color.White : NUD2.ForeColor = Color.Black
- NUD3.BackColor = Color.White : NUD3.ForeColor = Color.Black : 工程款1_nud.BackColor = Color.White : 工程款1_nud.ForeColor = Color.Black
- 工程款3_nud.BackColor = Color.White : 工程款3_nud.ForeColor = Color.Black : 工程款4_nud.BackColor = Color.White : 工程款4_nud.ForeColor = Color.Black
- 工程款5_nud.BackColor = Color.White : 工程款5_nud.ForeColor = Color.Black : 工程款6_nud.BackColor = Color.White : 工程款6_nud.ForeColor = Color.Black
- 工程款2_nud.BackColor = Color.White : 工程款2_nud.ForeColor = Color.Black : 金額1_und.BackColor = Color.White : 金額1_und.ForeColor = Color.Black
- 金額2_und.BackColor = Color.White : 金額2_und.ForeColor = Color.Black : 金額3_und.BackColor = Color.White : 金額3_und.ForeColor = Color.Black
- 金額4_und.BackColor = Color.White : 金額4_und.ForeColor = Color.Black : 金額5_und.BackColor = Color.White : 金額5_und.ForeColor = Color.Black
- 金額6_und.BackColor = Color.White : 金額6_und.ForeColor = Color.Black : NUD4.BackColor = Color.White : NUD4.ForeColor = Color.Black
- NUD5.BackColor = Color.White : NUD5.ForeColor = Color.Black : NUD6.BackColor = Color.White : NUD6.ForeColor = Color.Black
- ANUD1.BackColor = Color.White : ANUD1.ForeColor = Color.Black : ANUD2.BackColor = Color.White : ANUD2.ForeColor = Color.Black
- ANUD3.BackColor = Color.White : ANUD3.ForeColor = Color.Black : ANUD4.BackColor = Color.White : ANUD4.ForeColor = Color.Black
- ANUD5.BackColor = Color.White : ANUD5.ForeColor = Color.Black : BNUD1.BackColor = Color.White : BNUD1.ForeColor = Color.Black
- BNUD2.BackColor = Color.White : BNUD2.ForeColor = Color.Black : BNUD3.BackColor = Color.White : BNUD3.ForeColor = Color.Black
- BNUD4.BackColor = Color.White : BNUD4.ForeColor = Color.Black : BNUD5.BackColor = Color.White : BNUD5.ForeColor = Color.Black
- 請款金額_nud.BackColor = Color.White : 請款金額_nud.ForeColor = Color.Black : 請款總額_nud.BackColor = Color.White : 請款總額_nud.ForeColor = Color.Black
-
- 合約編號1_cb.BackColor = Color.White : 合約編號1_cb.ForeColor = Color.Blue : Label47.ForeColor = Color.Blue
-
- 語轉扭_bt.BackColor = Color.White : 語轉扭_bt.ForeColor = Color.Black : 查詢_bt.BackColor = Color.White : 查詢_bt.ForeColor = Color.Black
- 縮放2_bt.BackColor = Color.White : 縮放2_bt.ForeColor = Color.Black : 開新的請款單_bt.BackColor = Color.White : 開新的請款單_bt.ForeColor = Color.Black
- 存檔_bt.BackColor = Color.White : 存檔_bt.ForeColor = Color.Black : 報告移交_bt.BackColor = Color.White : 報告移交_bt.ForeColor = Color.Black
- 列印_bt.BackColor = Color.White : 列印_bt.ForeColor = Color.Black : 刪除_bt.BackColor = Color.White : 刪除_bt.ForeColor = Color.Black
- 存檔_tb.BackColor = Color.White : 存檔_tb.ForeColor = Color.Green
-
- 合約_dgv.EnableHeadersVisualStyles = True : 合約_dgv.BackgroundColor = Color.White : 合約_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 合約_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 合約_dgv.DefaultCellStyle.BackColor = Color.White : 合約_dgv.DefaultCellStyle.ForeColor = Color.Black
- 合約附錄_dgv.EnableHeadersVisualStyles = True : 合約附錄_dgv.BackgroundColor = Color.White : 合約附錄_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 合約附錄_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 合約附錄_dgv.DefaultCellStyle.BackColor = Color.White : 合約附錄_dgv.DefaultCellStyle.ForeColor = Color.Black
- 請款單_dgv.EnableHeadersVisualStyles = True : 請款單_dgv.BackgroundColor = Color.White : 請款單_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 請款單_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 請款單_dgv.DefaultCellStyle.BackColor = Color.White : 請款單_dgv.DefaultCellStyle.ForeColor = Color.Black
- 第1期_dgv.EnableHeadersVisualStyles = True : 第1期_dgv.BackgroundColor = Color.White : 第1期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 第1期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 第1期_dgv.DefaultCellStyle.BackColor = Color.White : 第1期_dgv.DefaultCellStyle.ForeColor = Color.Black
- 第2期_dgv.EnableHeadersVisualStyles = True : 第2期_dgv.BackgroundColor = Color.White : 第2期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 第2期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 第2期_dgv.DefaultCellStyle.BackColor = Color.White : 第2期_dgv.DefaultCellStyle.ForeColor = Color.Black
- 第3期_dgv.EnableHeadersVisualStyles = True : 第3期_dgv.BackgroundColor = Color.White : 第3期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 第3期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 第3期_dgv.DefaultCellStyle.BackColor = Color.White : 第3期_dgv.DefaultCellStyle.ForeColor = Color.Black
- 第4期_dgv.EnableHeadersVisualStyles = True : 第4期_dgv.BackgroundColor = Color.White : 第4期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 第4期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 第4期_dgv.DefaultCellStyle.BackColor = Color.White : 第4期_dgv.DefaultCellStyle.ForeColor = Color.Black
- 第5期_dgv.EnableHeadersVisualStyles = True : 第5期_dgv.BackgroundColor = Color.White : 第5期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- 第5期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightPink
- 第5期_dgv.DefaultCellStyle.BackColor = Color.White : 第5期_dgv.DefaultCellStyle.ForeColor = Color.Black
- Else
- Me.BackColor = Color.Black : Label11.BackColor = Color.Black : Label2.BackColor = Color.Black : Label5.BackColor = Color.Black
- Label40.BackColor = Color.Black : TabPage5.BackColor = Color.Black : TabPage6.BackColor = Color.Black : TabPage7.BackColor = Color.Black
- TabPage8.BackColor = Color.Black : TabPage9.BackColor = Color.Black
-
- Label7.ForeColor = Color.White : Label11.ForeColor = Color.White : Label24.ForeColor = Color.White : Label18.ForeColor = Color.White
- Label23.ForeColor = Color.White : Label17.ForeColor = Color.White : Label13.ForeColor = Color.White : Label16.ForeColor = Color.White
- Label20.ForeColor = Color.White : Label14.ForeColor = Color.White : Label12.ForeColor = Color.White : Label15.ForeColor = Color.White
- Label2.ForeColor = Color.White : Label5.ForeColor = Color.White : Label19.ForeColor = Color.White : Label40.ForeColor = Color.White
- Label45.ForeColor = Color.White : Label46.ForeColor = Color.White : Label41.ForeColor = Color.White : Label38.ForeColor = Color.White
- Label43.ForeColor = Color.White : Label44.ForeColor = Color.White : Label414.ForeColor = Color.White : Label42.ForeColor = Color.White
- Label39.ForeColor = Color.White : 主頁_ch.ForeColor = Color.White : 主頁明細_ch.ForeColor = Color.White : 請款單_ch.ForeColor = Color.White
- 報告移交單_ch.ForeColor = Color.White : 新版_ch.ForeColor = Color.White : Label3.ForeColor = Color.White : Label1.ForeColor = Color.White
- Label372.ForeColor = Color.LightPink : Label375.ForeColor = Color.LightPink : Label378.ForeColor = Color.LightPink
- CH1.ForeColor = Color.LightGreen : 稅額顯示_lb.ForeColor = Color.LightGreen : CH2.ForeColor = Color.LightGreen : Label390.ForeColor = Color.LightGreen
- Label389.ForeColor = Color.LightGreen : Label388.ForeColor = Color.LightGreen : Label387.ForeColor = Color.LightGreen : Label386.ForeColor = Color.LightGreen
- Label21.ForeColor = Color.LightGreen : Label8.ForeColor = Color.LightGreen : Label6.ForeColor = Color.LightGreen : Label9.ForeColor = Color.LightGreen
- Label37.ForeColor = Color.LightBlue : Label27.ForeColor = Color.LightBlue : Label26.ForeColor = Color.LightBlue : Label28.ForeColor = Color.LightBlue
- Label29.ForeColor = Color.LightBlue : Label30.ForeColor = Color.LightBlue : Label36.ForeColor = Color.LightBlue : Label34.ForeColor = Color.LightBlue
- Label33.ForeColor = Color.LightBlue : Label35.ForeColor = Color.LightBlue : Label31.ForeColor = Color.LightBlue : Label32.ForeColor = Color.LightBlue
- Label4.ForeColor = Color.White
-
- 關鍵字搜尋_tb.BackColor = Color.DimGray : 關鍵字搜尋_tb.ForeColor = Color.White : 合約編號_tb.BackColor = Color.DimGray : 合約編號_tb.ForeColor = Color.White
- 客戶名稱_tb.BackColor = Color.DimGray : 客戶名稱_tb.ForeColor = Color.White : 工程名稱_中_tb.BackColor = Color.DimGray : 工程名稱_中_tb.ForeColor = Color.White
- 工程名稱_英_tb.BackColor = Color.DimGray : 工程名稱_英_tb.ForeColor = Color.White : 附錄編號_tb.BackColor = Color.DimGray : 附錄編號_tb.ForeColor = Color.White
- 請款單號_tb.BackColor = Color.DimGray : 請款單號_tb.ForeColor = Color.White : 請款期數_cb.BackColor = Color.DimGray : 請款期數_cb.ForeColor = Color.White
- 付款期限_cb.BackColor = Color.DimGray : 付款期限_cb.ForeColor = Color.White : 請款內容_tb.BackColor = Color.DimGray : 請款內容_tb.ForeColor = Color.White
- 其他意見_tb.BackColor = Color.DimGray : 其他意見_tb.ForeColor = Color.White
- NUD1.BackColor = Color.DimGray : NUD1.ForeColor = Color.White : NUD2.BackColor = Color.DimGray : NUD2.ForeColor = Color.White
- NUD3.BackColor = Color.DimGray : NUD3.ForeColor = Color.White : 工程款1_nud.BackColor = Color.DimGray : 工程款1_nud.ForeColor = Color.White
- 工程款3_nud.BackColor = Color.DimGray : 工程款3_nud.ForeColor = Color.White : 工程款4_nud.BackColor = Color.DimGray : 工程款4_nud.ForeColor = Color.White
- 工程款5_nud.BackColor = Color.DimGray : 工程款5_nud.ForeColor = Color.White : 工程款6_nud.BackColor = Color.DimGray : 工程款6_nud.ForeColor = Color.White
- 工程款2_nud.BackColor = Color.DimGray : 工程款2_nud.ForeColor = Color.White : 金額1_und.BackColor = Color.DimGray : 金額1_und.ForeColor = Color.White
- 金額2_und.BackColor = Color.DimGray : 金額2_und.ForeColor = Color.White : 金額3_und.BackColor = Color.DimGray : 金額3_und.ForeColor = Color.White
- 金額4_und.BackColor = Color.DimGray : 金額4_und.ForeColor = Color.White : 金額5_und.BackColor = Color.DimGray : 金額5_und.ForeColor = Color.White
- 金額6_und.BackColor = Color.DimGray : 金額6_und.ForeColor = Color.White : NUD4.BackColor = Color.DimGray : NUD4.ForeColor = Color.White
- NUD5.BackColor = Color.DimGray : NUD5.ForeColor = Color.White : NUD6.BackColor = Color.DimGray : NUD6.ForeColor = Color.White
- ANUD1.BackColor = Color.DimGray : ANUD1.ForeColor = Color.White : ANUD2.BackColor = Color.DimGray : ANUD2.ForeColor = Color.White
- ANUD3.BackColor = Color.DimGray : ANUD3.ForeColor = Color.White : ANUD4.BackColor = Color.DimGray : ANUD4.ForeColor = Color.White
- ANUD5.BackColor = Color.DimGray : ANUD5.ForeColor = Color.White : BNUD1.BackColor = Color.DimGray : BNUD1.ForeColor = Color.White
- BNUD2.BackColor = Color.DimGray : BNUD2.ForeColor = Color.White : BNUD3.BackColor = Color.DimGray : BNUD3.ForeColor = Color.White
- BNUD4.BackColor = Color.DimGray : BNUD4.ForeColor = Color.White : BNUD5.BackColor = Color.DimGray : BNUD5.ForeColor = Color.White
- 請款金額_nud.BackColor = Color.DimGray : 請款金額_nud.ForeColor = Color.White : 請款總額_nud.BackColor = Color.DimGray : 請款總額_nud.ForeColor = Color.White
-
- 合約編號1_cb.BackColor = Color.DimGray : 合約編號1_cb.ForeColor = Color.LightBlue : Label47.ForeColor = Color.LightBlue
-
- 語轉扭_bt.BackColor = Color.DimGray : 語轉扭_bt.ForeColor = Color.White : 查詢_bt.BackColor = Color.DimGray : 查詢_bt.ForeColor = Color.White
- 縮放2_bt.BackColor = Color.DimGray : 縮放2_bt.ForeColor = Color.White : 開新的請款單_bt.BackColor = Color.DimGray : 開新的請款單_bt.ForeColor = Color.White
- 存檔_bt.BackColor = Color.DimGray : 存檔_bt.ForeColor = Color.White : 報告移交_bt.BackColor = Color.DimGray : 報告移交_bt.ForeColor = Color.White
- 列印_bt.BackColor = Color.DimGray : 列印_bt.ForeColor = Color.White : 刪除_bt.BackColor = Color.DimGray : 刪除_bt.ForeColor = Color.White
- 存檔_tb.BackColor = Color.DimGray : 存檔_tb.ForeColor = Color.LightGreen
-
- 合約_dgv.EnableHeadersVisualStyles = False : 合約_dgv.BackgroundColor = Color.DimGray : 合約_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 合約_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 合約_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 合約_dgv.DefaultCellStyle.BackColor = Color.Black : 合約_dgv.DefaultCellStyle.ForeColor = Color.White
- 合約附錄_dgv.EnableHeadersVisualStyles = False : 合約附錄_dgv.BackgroundColor = Color.DimGray : 合約附錄_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 合約附錄_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 合約附錄_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 合約附錄_dgv.DefaultCellStyle.BackColor = Color.Black : 合約附錄_dgv.DefaultCellStyle.ForeColor = Color.White
- 請款單_dgv.EnableHeadersVisualStyles = False : 請款單_dgv.BackgroundColor = Color.DimGray : 請款單_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 請款單_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 請款單_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 請款單_dgv.DefaultCellStyle.BackColor = Color.Black : 請款單_dgv.DefaultCellStyle.ForeColor = Color.White
- 第1期_dgv.EnableHeadersVisualStyles = False : 第1期_dgv.BackgroundColor = Color.DimGray : 第1期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 第1期_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 第1期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 第1期_dgv.DefaultCellStyle.BackColor = Color.Black : 第1期_dgv.DefaultCellStyle.ForeColor = Color.White
- 第2期_dgv.EnableHeadersVisualStyles = False : 第2期_dgv.BackgroundColor = Color.DimGray : 第2期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 第2期_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 第2期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 第2期_dgv.DefaultCellStyle.BackColor = Color.Black : 第2期_dgv.DefaultCellStyle.ForeColor = Color.White
- 第3期_dgv.EnableHeadersVisualStyles = False : 第3期_dgv.BackgroundColor = Color.DimGray : 第3期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 第3期_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 第3期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 第3期_dgv.DefaultCellStyle.BackColor = Color.Black : 第3期_dgv.DefaultCellStyle.ForeColor = Color.White
- 第4期_dgv.EnableHeadersVisualStyles = False : 第4期_dgv.BackgroundColor = Color.DimGray : 第4期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 第4期_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 第4期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 第4期_dgv.DefaultCellStyle.BackColor = Color.Black : 第4期_dgv.DefaultCellStyle.ForeColor = Color.White
- 第5期_dgv.EnableHeadersVisualStyles = False : 第5期_dgv.BackgroundColor = Color.DimGray : 第5期_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- 第5期_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 第5期_dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.DimGray
- 第5期_dgv.DefaultCellStyle.BackColor = Color.Black : 第5期_dgv.DefaultCellStyle.ForeColor = Color.White
-
- End If
- End Sub
- End Class
|