当前位置:首页经验技巧Excel经验excel技巧

excel表格上怎么打五角星

2025-01-17 10:04:11

1.如何在excel图表的折线图上的点变成五角星呢?

五角星可能做不到,至少2003版的不行,能换的形状只有这几种,楼主要是2007版的可能会有别的形状。

2.如何利用excel vba编程在窗体上画五角星

参考:Option Explicit Private lTriangle As FormShape Private lEllipse1 As FormShape Private lEllipse2 As FormShape Private lEllipse3 As FormShape Private lEllipse4 As FormShape Private lEllipse5 As FormShape Private lRectangle As FormShape Private Sub UserForm_Layout()'destroy any preexisting shapes.Call DestroyShapes'add the Shapes to the form.lTriangle = AddShape(Me, Triangle, Me.Width / 2, 0, 120, 80, &HFFFF00, "Click Me") lEllipse1 = AddShape(Me, Ellipse, 10, 10, 120, 40, vbMagenta, "Click Me") lEllipse2 = AddShape(Me, Ellipse, 50, 60, 60, 60, vbYellow, "Click Me") lEllipse3 = AddShape(Me, Ellipse, 160, 100, 40, 40, &HFF&) lEllipse4 = AddShape(Me, Ellipse, 200, 100, 30, 30, &H8080FF) lEllipse5 = AddShape(Me, Ellipse, 230, 100, 20, 20, &HC0C0FF) lRectangle = AddShape(Me, Rectangle, 10, 100, 60, 60, , "Click Me") End Sub Private Sub UserForm_Click() Dim tpt As POINTAPI GetCursorPos tpt ScreenToClient lFormHwnd, tpt'handle the shapes click events.Select Case (lFormHwnd, tpt.x, tpt.y) Case lTriangle.hwnd If GetPixel(lFormDC, tpt.x, tpt.y) = lTriangle.Fill Then MsgBox "You clicked Triangle1" End If Case lEllipse1.hwnd If GetPixel(lFormDC, tpt.x, tpt.y) = lEllipse1.Fill Then MsgBox "You clicked Ellipse1." End If Case lEllipse2.hwnd If GetPixel(lFormDC, tpt.x, tpt.y) = lEllipse2.Fill Then MsgBox "You clicked Ellipse2." End If Case lRectangle.hwnd MsgBox "You clicked Rectangle1" End Select End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)'remove the form subclass.Call UnSubClassForm(True) End Sub Private Sub DestroyShapes() DestroyWindow lTriangle.hwnd DestroyWindow lEllipse1.hwnd DestroyWindow lEllipse2.hwnd DestroyWindow lEllipse3.hwnd DestroyWindow lEllipse4.hwnd DestroyWindow lEllipse5.hwnd DestroyWindow lRectangle.hwnd End Sub Private Sub CommandButton1_Click() Unload Me End Sub。


电脑版

免责声明:本站信息来自网络收集及网友投稿,仅供参考,如果有错误请反馈给我们更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任,谢谢您的合作。
版权所有:五学知识网 Copyright © 2015-2025 All Rights Reserved .