Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcel

Excel Examples


ASN.1
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Azure Cloud Storage
Azure Service Bus
Bounced Email
Box
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
Facebook
Firebase
GeoOp
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Gzip
HTML-to-XML/Text
HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)

Jira
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
PayPal
Peoplevox
QuickBooks
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Shopify
Socket/SSL/TLS
Spider
Stream
Stripe
SugarCRM
Tar Archive
Twitter
VoiceBase
Walmart
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Xero
Zip
curl
eBay

 

 

 

(Excel) Get the Last N Lines of a StringBuilder

Returns up to the last N lines of the contents of a Chilkat StringBuilder.

Download Excel Class Modules

Chilkat Excel Class Modules

Dim sb As Chilkat.StringBuilder
Set sb = Chilkat.NewStringBuilder

Dim i As Long
i = 1
Do While i < 100
    Dim success As Boolean
    success = sb.Append("This is line number ")
    success = sb.AppendInt(i)
    success = sb.Append( & vbCrLf)
    i = i + 1
Loop

Dim bCrlf As Boolean
bCrlf = True
Debug.Print sb.LastNLines(12,bCrlf)

'  Output is:
' 
'  	This is line number 88
'  	This is line number 89
'  	This is line number 90
'  	This is line number 91
'  	This is line number 92
'  	This is line number 93
'  	This is line number 94
'  	This is line number 95
'  	This is line number 96
'  	This is line number 97
'  	This is line number 98
'  	This is line number 99
' 

 

© 2000-2016 Chilkat Software, Inc. All Rights Reserved.