Excel Gadget: List all the Sheet, then click one of them, automatically jump

xiaoxiao2021-03-05  23

Xiaogongju

Very happy, just achieved a function, Excel's VBA programming, can finally list all the sheet, then click on one, automatically jump! The code is simple, as follows:

Private sub listbox1_click ()

Workbooks.Application.sheets (ListBox1.listIndex 1) .select

End Sub

Private sub userform_click ()

Listbox1.clear

DIM I as integer

For i = 1 to workbooks.application.sheets.count

Set wsheeta = workbooks.Application.sheets (i)

Me.Listbox1.addItem wsheeta.name

Next i

End Sub

转载请注明原文地址:https://www.9cbs.com/read-35952.html

New Post(0)