劉任昌EXCEL基本功能,VBA巨集程式設計

畫圖畫面

畫圖VBA程式碼

'拷貝自https://excelatfinance.com/xlf19/xlf-...
'Dr Ian O'Connor, CPA. - located in Victoria, Australia.
'2021/11/29劉任昌指導我從
Option Explicit
Const topleft As String = "C5"  ' anchor cell
Const diam As Integer = 180     ' points
Dim Shp As Shape  '宣告dim 變數Shp是圖形Shape  global

Sub xlfAddCircle1()
Dim TLCleft As Double 'local variables區域變數
Dim TLCtop As Double
 
        TLCleft = Range(topleft).Left
        TLCtop = Range(topleft).Top
 
        Set Shp = ActiveSheet.Shapes.AddShape(Type:=msoShapeOval, _
                                              Left:=TLCleft, Top:=TLCtop, _
                                              Width:=diam, Height:=diam)
        With Shp
                .Fill.Visible = msoFalse
                .Line.Weight = 10
                .Line.ForeColor.Brightness = 0.4
                .ThreeD.BevelTopType = msoBevelCircle
        End With
End Sub
Sub 劉任昌超級臭屁()

Dim x As Double '宣告 x 是倍精度double
Dim y As Double '宣告 y 是倍精度double
Dim i As Integer '選告整數i
 For i = 1 To 20
        x = 20
        y = 20 * i
Set Shp = ActiveSheet.Shapes.AddShape(Type:=msoShapeOval, Left:=x, Top:=y, Width:=diam, Height:=diam)
        With Shp
                .Fill.Visible = msoFalse
                .Line.Weight = 10
                .Line.ForeColor.Brightness = 0.4
                .ThreeD.BevelTopType = msoBevelCircle
        End With
  Next
       With Cells(1, 1) 'with 固定前面的物件end with
                .Value = "劉任昌"
                .Interior.Color = RGB(0, 0, 255)
                With .Font
                  .Size = 16
                  .Bold = True
                  .Color = RGB(255, 255, 255)
                End With
        End With
End Sub
Sub 刪除()
   For Each Shp In ActiveSheet.Shapes 'Shp 共用的物件宣告成全域變數
      Shp.Delete
   Next
End Sub





劉任昌107影片

我的EXCEL試算表

劉任昌	Shift+Tab		Shift	變速檔	shift gear	preserve=保留
左Shift+Tab		右邊Tab			gear齒輪	
	Enter	計算	註解		shift 改變	
shift	連續	16384	=COLUMN(天涯海角)		Alt	
Ctrl	多重選擇	1048576	=ROW(天涯海角)		Alternative	另外一個選擇
control		16384	=POWER(2,14)			
	ctrl 往上	1048576	=POWER(2,20)			
ctrol往左	ctrl往右	X24	16224			
	ctrl 往下	F6	156			
劉	=LEFT(天涯海角,1)	D4	4			
劉任	=LEFT(天涯海角,2)		16384	=SUM(D8:D10)		
任昌	=RIGHT(天涯海角,2)					
重選	=MID(B5,2,2)					
超級帥哥	劉任昌	=INDIRECT(A14)		間接定址		
天涯海角		direct				
		indirect				

VBA程式碼

Public Sub 劉任昌第一個城市()
'練習寫迴圈 VBA=Visual Basic Application
'Dim i, j As Integer
j = 7
For i = 1 To 15
  Cells(i, j).Value = i * i
Next
'VBA迴圈的結束Next, C或Javascript {}定義迴圈範圍
'VBA程式語言寫Microsoft Office 巨集 Macro小程式
End Sub

留言

  1. https://xjsjdaafhuifhhew.blogspot.com/2021/11/excel-vba.html

    回覆刪除
  2. https://takingfinance.blogspot.com/2021/11/excel.html

    回覆刪除
  3. https://sumairuxuan.blogspot.com/2021/11/excelvba.html

    回覆刪除
  4. https://123abccz.blogspot.com/2021/11/youtube-video-player.html

    回覆刪除
  5. https://tim30518497z.blogspot.com/2021/11/excelvba.html

    回覆刪除
  6. https://loyongqin.blogspot.com/2021/11/excell.html

    回覆刪除
  7. https://chenchungxuan911108.blogspot.com/2021/11/excel.html

    回覆刪除
  8. https://haungsi.blogspot.com/2021/11/excel.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

文化大學國企系許建隆、許建隆遭撤除之舞弊論文

資料表IF, AND, OR函數,股票圖