terry m
terry m

Reputation: 1

convert integer to string vba

I can't seem to get a simple line of code to work.

lblTotalPts.Caption = CStr(x)

This is a powerpoint label and x is an accumulator. X is declared as Long. X is holding the correct value when I hover but won't cast to a string.

thanks.

Upvotes: 0

Views: 573

Answers (1)

Steve Rindsberg
Steve Rindsberg

Reputation: 14809

You access the properties of ActiveX shapes a bit differently than normal PPT shapes.

Change this:

lblTotalPts.Caption = CStr(x)

To this:

lblTotalPts.OLEFormat.Object.Caption = CStr(x)

Upvotes: 1

Related Questions