본문 바로가기
  • Welcome!
자동화 도구 ToolBOX/ToolBOX VBA

ToolBOX VBA Update for "ASAD SIDDIQUI"

by ToolBOX01 2022. 12. 23.
반응형

■ Key update features

-You can add parameter names
-You can choose the parameter type

>> How to add parameter

1) open excel file
2) Add parameter name to cell > Save the excel file > Quit Excel programming > Open the saved excel file

[ Add parameter name ]


3) Select the Parameter type > Save the excel file

[ Select the Parameter type ]

* "WEIGHT" is the weight calculation area. Do not delete, do not change

>> VBA Code

Option Explicit
Private Sub Workbook_Open()
       
              Dim region As Variant
              Dim region_range As Range
              
              '// Parameter Type Select
              region = Array("String", "Real Number", "Integer", "Yes No")
              
              '// Parameter region
              Dim oColumnscount As Long: oColumnscount = Cells(15, Columns.Count).End(xlToLeft).Column
              Set region_range = Range(Cells(14, 10), Cells(14, oColumnscount))
                  
                  With region_range.Validation
                   .Delete
                   .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Formula1:=Join(region, ",")
                   .IgnoreBlank = True
                   .InCellDropdown = True
                   .InputTitle = ""
                   .ErrorTitle = "Error"
                   .InputMessage = ""
                   .ErrorMessage = "Please Provide a Valid Input"
                   .ShowInput = True
                   .ShowError = True
                  End With
End Sub

 

 

ToolBOX VBA 1D5.xlsm
0.10MB


■ How the program works

1. Creo 어셈블 파일을 Open 합니다

2. Click the "NEW" button

3. Import the parameter value defined in the Excel file from the model  (PART_NO ~ APPROVED)

4. If there is no parameter name in the model, it is automatically added

Attention >
- Be sure to open the assemble file. When I open and run the part file, an error occurs
- I used the excel scroll function.

The rest of the features are in development