sunilbsrv2k
Board Regular
- Joined
- May 25, 2018
- Messages
- 73
Hi,
I have a piece of code with which I can display the required range or a worksheet in a Listbox.
However, for some audit purpose, I want the contents of a workbook to be displayed in the list box without actually opening it.
Is this a possibility? Please advise.
Below is my code for displaying certain cells in the current workbook.
Thanks
[/FONT][/COLOR]
I have a piece of code with which I can display the required range or a worksheet in a Listbox.
However, for some audit purpose, I want the contents of a workbook to be displayed in the list box without actually opening it.
Is this a possibility? Please advise.
Below is my code for displaying certain cells in the current workbook.
Code:
Private Sub CommandButton1_Click()[COLOR=rgba(0, 0, 0, 0.7)][FONT="Source Serif Pro"] With ListBox1[/FONT][/COLOR]
[COLOR=rgba(0, 0, 0, 0.7)][FONT="Source Serif Pro"] .ColumnCount = 6[/FONT][/COLOR]
[COLOR=rgba(0, 0, 0, 0.7)][FONT="Source Serif Pro"] .ColumnWidths = "50;70;90;70;70;50"[/FONT][/COLOR]
[COLOR=rgba(0, 0, 0, 0.7)][FONT="Source Serif Pro"] .RowSource = Sheet1.Range("A1:F20").Address[/FONT][/COLOR]
[COLOR=rgba(0, 0, 0, 0.7)][FONT="Source Serif Pro"] End With[/FONT][/COLOR]
[COLOR=rgba(0, 0, 0, 0.7)][FONT="Source Serif Pro"]End Sub
Thanks
[/FONT][/COLOR]