Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2021, 04:02 PM
trevorc trevorc is offline Use VBA to resize a note entry Windows 7 32bit Use VBA to resize a note entry Office 2013
Competent Performer
Use VBA to resize a note entry
 
Join Date: Jan 2017
Posts: 174
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default Use VBA to resize a note entry

Hi All,
I'm trying to resize a note field using VBA, i recorded a macro to do what i wanted but if fails after adding the note.

The code below is what the recorded macro is for adding and resizing a basic note.
Any idea's ???



Code:
Sub Macro18()
    Range("W12").AddComment
    Range("W12").Comment.Visible = False
    Range("W12").Comment.Text Text:="Me:" & Chr(10) & ""
    Selection.ShapeRange.ScaleWidth 1.95, msoFalse, msoScaleFromTopLeft
    Selection.ShapeRange.ScaleHeight 2.12, msoFalse, msoScaleFromTopLeft
End Sub
Reply With Quote
  #2  
Old 12-20-2021, 12:04 PM
trevorc trevorc is offline Use VBA to resize a note entry Windows 7 32bit Use VBA to resize a note entry Office 2013
Competent Performer
Use VBA to resize a note entry
 
Join Date: Jan 2017
Posts: 174
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default

With a lot of trial and many errors i found this works.

Code:
    Intersect(ActiveCell.EntireRow, tblColumns("Notes").Range).Comment.Shape.Width = 600
    Intersect(ActiveCell.EntireRow, tblColumns("Notes").Range).Comment.Shape.Height = 800
Reply With Quote
  #3  
Old 12-21-2021, 03:53 AM
p45cal's Avatar
p45cal p45cal is offline Use VBA to resize a note entry Windows 10 Use VBA to resize a note entry Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

Could this be a bit more straightforward?:
Code:
Sub Macro18()
With Range("W12").AddComment
  .Visible = False
  .Text Text:="Me:" & Chr(10)
  .Shape.Width = 600
  .Shape.Height = 800
End With
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
One Note Online not transferring to One Note App Jaden OneNote 0 06-14-2018 02:39 PM
Use VBA to resize a note entry End note Text Style and End note Reference Style Kohawk65 Word 4 01-08-2016 08:29 AM
Use VBA to resize a note entry Help with VBA to resize images Yuffster Word VBA 2 01-30-2015 06:05 AM
Use VBA to resize a note entry Slide Minature Resize? excelledsoftware PowerPoint 2 02-01-2013 03:49 PM
Use VBA to resize a note entry Resize and align AndyDDUK PowerPoint 9 11-09-2012 05:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:34 AM.


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