?
Solved

resizing Flexgrid

Posted on 2003-03-14
1
Medium Priority
?
867 Views
Last Modified: 2008-02-01
Hi,

please ammend this code to resize the height of MSflexgrid rows to 100 , and resize the columns width to be autofit


MSflexGrid1.Rows = RS.RecordCount
For i = 0 To MSflexGrid1.Rows
   MSflexGrid1.RowHeight(i) = 100
Next

MSflexGrid1.Cols = RS.Fields.Count
For i = 0 To MSflexGrid1.Cols
   MSflexGrid1.colwidth(i) = ???
Next

thanx
0
Comment
Question by:toni2002
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
vim_asteya earned 150 total points
ID: 8141949
am not able to recollect the exact code, try this, will give the exact code in another 2 days,but by then u will have the other experts help too.

MSflexGrid1.Rows = RS.RecordCount
For i = 0 To MSflexGrid1.Rows
  MSflexGrid1.RowHeight(i) = 100
Next

MSflexGrid1.Cols = RS.Fields.Count
For i = 0 To MSflexGrid1.Cols
  MSflexGrid1.colwidth(i) = form.textwidth(MSflexGrid1.textmatrix(MSflexGrid1.row,MSflexGrid1.col))
Next

0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question