JackMDaniels

New Member
Joined
Feb 10, 2014
Messages
24
Hi guys

I'm wanting to insert "v." into the textbox supporting "Version", I'd like to keep it editable but have it come up every time with the form field, any suggestions? :)

Note this is for PPT not excel, but there's no VBA for PPT forum

Code:
Private Sub txtVersion_Change()


End Sub


Private Sub UserForm_Activate()
Dim Sld             As Slide
Dim SldM            As Master
Dim StrContainer    As String
Dim Shp             As Shape


With cmbClassification
    .AddItem " ", 0
    .AddItem "Public", 1
    .AddItem "For internal use", 2
    .AddItem "Confidential", 3
    .AddItem "Secret", 4
End With


Set Sld = ActivePresentation.Slides("Slide90")
    For Each Shp In Sld.Shapes
        If Shp.Type = msoTable Then
            StrContainer = Shp.Table.Cell(1, 2).Shape.TextFrame.TextRange.Text
            If InStr(1, StrContainer, "/") <> 0 Then
                Me.txtVersion = Trim(Left(StrContainer, InStr(1, StrContainer, "/") - 1))
                Me.txtStatus = Trim(Right(StrContainer, Len(StrContainer) - InStr(1, StrContainer, "/")))
            End If
            Me.txtDate = Shp.Table.Cell(2, 2).Shape.TextFrame.TextRange.Text
            Me.txtOwner = Shp.Table.Cell(3, 2).Shape.TextFrame.TextRange.Text
            Me.txtCreator = Shp.Table.Cell(4, 2).Shape.TextFrame.TextRange.Text
            Me.txtFunction = Shp.Table.Cell(5, 2).Shape.TextFrame.TextRange.Text
            Me.txtApprover = Shp.Table.Cell(6, 2).Shape.TextFrame.TextRange.Text
            Me.txtDocID = Shp.Table.Cell(7, 2).Shape.TextFrame.TextRange.Text
            Me.txtDocLocation = Shp.Table.Cell(8, 2).Shape.TextFrame.TextRange.Text
            Exit For
        End If
    Next
Set Sld = Nothing


Set SldM = ActivePresentation.SlideMaster
    StrContainer = SldM.Shapes(26).TextFrame.TextRange.Text
    StrContainer = Right(StrContainer, Len(StrContainer) - 23)
    If InStr(1, StrContainer, " - ") > 5 Then
        Me.txtFileName = Trim(Left(StrContainer, InStr(1, StrContainer, " - ") - 1))
    End If
    Me.cmbClassification = SldM.Shapes(28).TextFrame.TextRange.Text
Set SldM = Nothing


End Sub
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top