Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Userform interaction with the VBA code

I have created a user form with two options.
First option the designer could select "ALL" to design all
marks(J1,J2,J3,..........) which are shown in column A. the number of
those of marks in that column is determinied by the Variable "Nu".

how can i code when some one select" ALL" in the userform, to tell it
that" Nu" is equal to the value as shown in the attached code.

Second Option is for the designer to "Select Mark", where he would type
the mark in the textbox next to that option, and then the program will
analyse that specific mark. The marks can be
(J1,J2,J3......................).

right now the program will analyze all the marks in that column. i just
would like to make it more flexible.

the name of the userform is "JOISTMARKS".

I apprecaite any help!

This is part of the code :

'Get the mark
'Nu = Int(Application.InputBox("Number of Joist marks?"))
JOISTMARKS.Show
Nu = shtQDS.Range("BC1").Value
For Z = 1 To Nu Step 1
strMark = "J" & Z
Application.ScreenUpdating = False
'Error check
'If strMark = "" Then
' MsgBox "No mark chosen. Analysis cancelled."
'GoTo CancelAnalysis
'End If

'Clear old data
shtEM.Range("B2:B9").clearcontents
shtEM.Range("B10:C13").clearcontents
shtPA.Range("B33:AO44").clearcontents
shtPA.Range("B66:AO76").clearcontents
'shtNCS.Range("A3:H1000").clearcontents
shtResults.Range("A3:AR65536").clearcontents
shtNPCJ.Range("B10:C13").clearcontents
intResultRow = 3

'Set initial values
i = 3
intLines = 0
intLoadCase = 1
boolCancel = False

Application.ScreenUpdating = False
Worksheets.Add after:=Worksheets(Worksheets.Count)
NewSheet = ActiveSheet.Name
With Worksheets(NewSheet)
.Move after:=Worksheets(Worksheets.Count)
.Name = strMark
.Activate
Columns("A:A").ColumnWidth = 51.14
Columns("B:AR").Select
Selection.ColumnWidth = 13
ActiveWindow.Zoom = 75
End With

'Find out how many load cases we're dealing with

Do
If shtQDS.Cells(i, 1).Value = strMark Then
If shtQDS.Cells(i, 4).Value intLoadCases Then intLoadCases =
shtQDS.Cells(i, 4).Value
End If
i = i + 1
Loop Until IsEmpty(shtQDS.Cells(i, 1))
..
..
..
...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flow of control in VBA Question - Userform Interaction Alan Excel Programming 3 December 23rd 04 01:12 PM
Userform Code scrabtree23[_3_] Excel Programming 3 December 5th 04 05:05 AM
UserForm code help needed. madbloke[_8_] Excel Programming 1 September 22nd 04 07:05 PM
VBA code for Userform Martin Los Excel Programming 4 December 5th 03 03:04 PM
UserForm Interaction Bob Phillips[_5_] Excel Programming 0 September 22nd 03 08:12 PM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"