Access Object Property from VBA Module in Excel 2010

I have a module in VBA code in an Excel 2010 spreadsheet.

The spreadsheet has multiple worksheets.

On one worksheet I have placed a "Progress Bar ActiveX Control".

I need to be able to update the current value of this control from my module, but can't work out the correct code.
LVL 1
Terry RogersIT Senior EngineerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rgonzo1971Connect With a Mentor Commented:
HI,

pls try
Dim cProgressBar1 As Object

Set cProgressBar1 = Sheet1.ProgressBar1 '// OR Worksheets("YourSheetName").ProgressBar1
cProgressBar1.Value = Counter

Open in new window

Regards
1
 
Terry RogersIT Senior EngineerAuthor Commented:
Worked a treat. Thank you! :)
0
All Courses

From novice to tech pro — start learning today.