Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 11-05-2018, 11:53 PM
phoenixmoto phoenixmoto is offline vba word Windows 7 64bit vba word Office 2007
Banned
vba word
 
Join Date: Jul 2018
Posts: 11
phoenixmoto is on a distinguished road
Default vba word

Here in this code in word as i dont know how to use functions(ex:application.worksheetfunction in excel) i tried to create my own function but it is not working may be function creation is incorrect. so please answer me that is it possible to use something like application.worksheetfunction in word or shouldd we create our own function if so how?

If wow.Value = True Then
Select Case comb
Case "addition"
Call amrit(a, b, c)
Case "subtraction"
Call sam(a, b, c)


End Select
End If
hide
End SubSub sum(a As Variant, b As Variant, c As Variant)
ThisDocument.TextBox10.Value = amrit(a, b, c)
End Sub
Sub minus(a As Variant, b As Variant, c As Variant)
ThisDocument.TextBox10.Value = sam(a, b, c)
End Sub
End Sub
Public Function amrit(a As Variant, b As Variant, c As Variant) As Variant
amrit = a + b + c
End Function
Public Function sam(a As Variant, b As Variant, c As Variant) As Variant
sam = a - b - c
End Function
  #2  
Old 11-06-2018, 01:23 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline vba word Windows 7 64bit vba word Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,943
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Please do not post the same thread multiple times. Thanks
Thread closed
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Closed Thread



Other Forums: Access Forums

All times are GMT -7. The time now is 10:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft