Reply
 
Thread Tools Display Modes
  #1   Report Post  
Sorcerer13 Sorcerer13 is offline
Junior Member
 
Location: Yorkshire
Posts: 0
Default Updates to Userform not saved?

I have a Userform with 15 Checkboxes on it, which is in development. Every tiome the User decides to change the bits at the top of the form (the Company logo, the headings etc.), I need to shift the checkboxes up or down so the form looks reasonable.
I decided to knock together a quick VBA process to adjust the position of the Checkboxes (see below). I execute this from a "free standing" Module ('cos it's just for me to use). It works perfectly, except that if I double click on the CBForm, the Checkboxes are still in their original positions (even though the "CBForm.Show" shows them in their "new" positions etc.). Presumably I'm missing a "save" or "update" option at the end of the loop, but I can't find one.
Can anyone help?
Code:
Sub CBSetPos()
 Const cintHeight    As Integer = 15
 Const cintTop       As Integer = 50
 Dim intPtr          As Integer
 Dim intOldTop       As Integer
 Dim intTop          As Integer
 Dim strCBName       As String
   intTop = cintTop - cintHeight
   For intPtr = 1 To 15
     intTop = intTop + cintHeight
     strCBName = "Checkbox" & intPtr
     intOldTop = CBForm.Controls(strCBName).Top
     CBForm.Controls(strCBName).Top = intTop
     CBForm.Controls(strCBName).Caption = strCBName & " " & intTop
     Debug.Print strCBName & ":" & "Was " & intOldTop & " now " & intTop
   Next intPtr
   CBForm.Show
 End Sub
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Updates to Userform not saved?

You may have noticed that this forum is rather slow these days. If you don't
get a reply here, I recommend that you ask in an Office
customization/programming forum such as
http://social.msdn.microsoft.com/For...orddev/threads (at MSDN)
and/or at http://answers.microsoft.com/en-us/o...tomize?tab=all
(at the Microsoft Community).

--
Stefan Blom
Microsoft Word MVP




"Sorcerer13" wrote in message
...

I have a Userform with 15 Checkboxes on it, which is in development.
Every tiome the User decides to change the bits at the top of the form
(the Company logo, the headings etc.), I need to shift the checkboxes up
or down so the form looks reasonable.
I decided to knock together a quick VBA process to adjust the position
of the Checkboxes (see below). I execute this from a "free standing"
Module ('cos it's just for me to use). It works perfectly, except that
if I double click on the CBForm, the Checkboxes are still in their
original positions (even though the "CBForm.Show" shows them in their
"new" positions etc.). Presumably I'm missing a "save" or "update"
option at the end of the loop, but I can't find one.
Can anyone help?

Code:
--------------------
Sub CBSetPos()
Const cintHeight As Integer = 15
Const cintTop As Integer = 50
Dim intPtr As Integer
Dim intOldTop As Integer
Dim intTop As Integer
Dim strCBName As String
intTop = cintTop - cintHeight
For intPtr = 1 To 15
intTop = intTop + cintHeight
strCBName = "Checkbox" & intPtr
intOldTop = CBForm.Controls(strCBName).Top
CBForm.Controls(strCBName).Top = intTop
CBForm.Controls(strCBName).Caption = strCBName & " " & intTop
Debug.Print strCBName & ":" & "Was " & intOldTop & " now " & intTop
Next intPtr
CBForm.Show
End Sub
--------------------




--
Sorcerer13


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UserForm Macro Eric Microsoft Word Help 1 June 3rd 08 10:55 AM
userform question Erik Witkop Microsoft Word Help 7 May 16th 08 01:03 AM
Userform Sharpe Microsoft Word Help 1 March 17th 06 06:13 AM
Userform in word SuzieQ Microsoft Word Help 2 December 12th 05 09:42 PM
Userform - .Range_ Michelle Microsoft Word Help 1 December 8th 05 02:45 AM


All times are GMT +1. The time now is 01:07 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"