Skip to content

Instantly share code, notes, and snippets.

@themegabyte
Created August 9, 2022 14:14
Show Gist options
  • Select an option

  • Save themegabyte/a12f442501e2d8f0548742b33f8eeebb to your computer and use it in GitHub Desktop.

Select an option

Save themegabyte/a12f442501e2d8f0548742b33f8eeebb to your computer and use it in GitHub Desktop.
Adds Premium support to Direct Quote.
Sub PremiumAdderFC()
'
' PremiumAdderFC
' Adds Premium support to Direct Quote.
'
Dim PlatPrice As Integer
PlatPrice = 299
FormattedPlatPrice = Format(PlatPrice, "$##,##0.00")
Selection.InsertRowsBelow 1
Selection.MoveLeft Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="Platinum Support"
Selection.MoveRight Unit:=wdCell, Count:=3
Selection.TypeText Text:=FormattedPlatPrice
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:=FormattedPlatPrice
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.SelectCell
PrevPrice = Val(Replace(Replace(Selection.Text, "$", ""), ",", ""))
NewPrice = PrevPrice + PlatPrice
FormatNewPrice = Format(NewPrice, "$##,##0.00")
Selection.TypeText Text:=FormatNewPrice
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.SelectCell
Selection.TypeText Text:=FormatNewPrice
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment