Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-28-2024, 08:53 AM
Shelley Lou Shelley Lou is offline VBA MoveStartUntil cSet query Windows 10 VBA MoveStartUntil cSet query Office 2016
Expert
VBA MoveStartUntil cSet query
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA MoveStartUntil cSet query

Thanks Vivka, that actually fixes something in another code I'm working on but won't work for what I need in this one, I only want it to look for the character before the last character in a paragraph not insert anything as that comes later in the code. I'm thinking I need to insert something like count:=-1 or something like that.

Code:
If sLastWord = ")" Then sLastWord = .Words.Last.Previous.Previous.Words(1) 'Looks for punc after a bracket at end of para
If sLastWord = "]" Then sLastWord = THIS IS WHERE I'M STRUGGLING 'Looks for punc before a closing square bracket at end of para
Debug.Print sFirstChar, sLastWord
If Not sLastWord Like "*[.!?:;,]" Then 'If para ends with any of these characters do nothing
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IFS query (I think) ronsar Excel 1 12-06-2018 09:04 AM
VBA MoveStartUntil cSet query Conditional query ... LearnerExcel Excel 5 02-06-2018 01:13 AM
Query and Power Query not working Excel 2016 bl10 Excel 0 07-22-2016 06:25 PM
VBA MoveStartUntil cSet query Baseline query joday48 Project 6 01-25-2013 09:50 AM
How to Query Text in MS-Excel 2010 or Import Data & Query outside of Excel? mag Excel 0 10-18-2012 11:15 AM

Other Forums: Access Forums

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