Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-11-2023, 04:30 AM
yacov yacov is offline text result is too small hard to see Windows 10 text result is too small hard to see Office 2016
Competent Performer
text result is too small hard to see
 
Join Date: Oct 2019
Posts: 146
yacov is on a distinguished road
Default text result is too small hard to see

Hi,
Attached below is a very useful macro written by Macropod and for that I want to thank him again.
and ask if it is possible to increase the text size of the result in this macro.
Also attached is a picture of the resulting text.

Thanks a lot,
Yacov

Sub MyCalculatorSentences()
Selection.Range.Sentences(1).Select
Dim aChar As Variant, aRng As Range, iTotal As Long
Set aRng = Selection.Range
For Each aChar In aRng.Characters
Select Case AscW(aChar)
Case 1488 To 1497: iTotal = iTotal + AscW(aChar) - 1487
Case 1498: iTotal = iTotal + 20
Case 1499: iTotal = iTotal + 20
Case 1500: iTotal = iTotal + 30
Case 1501: iTotal = iTotal + 40
Case 1502: iTotal = iTotal + 40
Case 1503: iTotal = iTotal + 50
Case 1504: iTotal = iTotal + 50
Case 1505: iTotal = iTotal + 60
Case 1506: iTotal = iTotal + 70
Case 1507: iTotal = iTotal + 80
Case 1508: iTotal = iTotal + 80
Case 1509: iTotal = iTotal + 90
Case 1510: iTotal = iTotal + 90
Case 1511: iTotal = iTotal + 100
Case 1512: iTotal = iTotal + 200
Case 1513: iTotal = iTotal + 300
Case 1514: iTotal = iTotal + 400
Case 45: iTotal = iTotal * -1 'a minus sign
End Select
Next aChar
MsgBox iTotal
End Sub
Sub MyCalculatorOr()
Selection.Range.Sentences(1).Select
Dim aChar As Variant, aRng As Range, iTotal As Long
Set aRng = Selection.Range
For Each aChar In aRng.Characters
Select Case AscW(aChar)
Case 1488 To 1497: iTotal = iTotal + AscW(aChar) - 1487
Case 1498: iTotal = iTotal + 20
Case 1499: iTotal = iTotal + 20
Case 1500: iTotal = iTotal + 30
Case 1501: iTotal = iTotal + 40
Case 1502: iTotal = iTotal + 40
Case 1503: iTotal = iTotal + 50
Case 1504: iTotal = iTotal + 50
Case 1505: iTotal = iTotal + 60
Case 1506: iTotal = iTotal + 70
Case 1507: iTotal = iTotal + 80
Case 1508: iTotal = iTotal + 80
Case 1509: iTotal = iTotal + 90
Case 1510: iTotal = iTotal + 90
Case 1511: iTotal = iTotal + 100
Case 1512: iTotal = iTotal + 200
Case 1513: iTotal = iTotal + 300


Case 1514: iTotal = iTotal + 400
Case 45: iTotal = iTotal * -1 'a minus sign
Case 47: iTotal = 0 'reset counter to zero if / encountered
Case Else: Debug.Print AscW(aChar) 'show unhandled characters in Immediate Window
End Select
Next aChar
MsgBox iTotal
End Sub
Attached Images
File Type: png EXAMPLE.png (5.6 KB, 12 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling data from MenaData and BioData in result sheet based on employee id and then result in resul aligahk06 Excel 2 09-07-2019 02:23 PM
Data Compare and result as true or false in result sheet aligahk06 Excel 1 08-29-2019 06:44 AM
text result is too small hard to see searching a small text in a bigger text using VLOOKUP Tesla Excel 6 04-05-2019 05:48 AM
text result is too small hard to see One Cell that controlls spread sheet result button to change simple fomula result RAH Excel Programming 5 03-31-2018 04:52 PM
text result is too small hard to see Hard space in justified text czytajsk Word 6 06-27-2012 05:03 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:03 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