Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-10-2022, 09:46 AM
VBAadvocate VBAadvocate is offline Split cell functionality Windows 10 Split cell functionality Office 2019
Novice
 
Join Date: Feb 2022
Posts: 12
VBAadvocate is on a distinguished road
Default

I have been working to create a routine to format some tables with a specified number of beginning rows with .HeadingFormat to make them repeat on each page. That resulted in the fact that tables with any cells merged (mergers) vertically, the row object references are not valid. The rows must be split before using VBA to process them.

I have developed a very nice set of routines for determining if a cell is a merger (vert., horiz. or both) and can also give the user a list (cells for vert. and rows for horiz.).

Arrays are used to save the rows and cells with mergers. The arrays were intended to be used to split the cells (vert. mergers only) and remerge them after processing my table formatting.

However, I think I have encountered a bug. Some vert. merged cells cannot be split depending on the surrounding/adjacent merging. Also, when attempting to trap the error, sometimes it works and sometime not.


And, I think that some cells can't be split is also a bug. Selecting the cell, manually, and performing the split from the ribbon command works fine.

When, the error is untrappable, VBA simply displays the error description and won't branch to the On Error label and stops.

The only way to practically demonstrate this problem is to let you try it with my project file, attached.

Please remember, not everyone writes scripting the same way. I like everything as I have it except for the error trapping discrepancy when attempting to split a cell and help with that would be appreciated.

I have seen a lot of forum discussions about similar attempts to identify mergers and I have a very good one, I think.

My apologies for being so verbose.
Attached Files
File Type: docm TableCellMergeHacking_R04.docm (50.7 KB, 8 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
slicer: OR functionality problem... denpries Excel 0 01-23-2017 12:33 AM
Split cell functionality Text Box with Word Functionality? elmousa68 Word VBA 3 01-09-2014 01:55 AM
Split cell functionality Save as PDF - How to add extra functionality to split by page break amlong Word VBA 7 02-22-2013 11:34 PM
Split cell functionality Split Data from One Cell Into Two Karen615 Excel 3 09-20-2011 06:36 AM
Split cell functionality Embedded Excel functionality? markg2 Word 1 01-13-2011 02:17 PM

Other Forums: Access Forums

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