Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Code For Moving To The First Blank Cell In A Worksheet; Moving Left,right,up Or Down


I have created an application form as a userform in Excel. I need to send the data entered into my text boxes when the program runs to separate excel cells in a worksheet.

My problem is I can use code that will send the textbox entry to a specific cell eg. If my textbox is named Surname I can say

range("a5").value = surname but if I do that when I run the programme to enter the next record for someone else the first record will be overwritten.

I NEED A CODE LINE THAT WILL TAKE ME TO THE FIRST EMPTY CELL AND ALLOW ME TO MOVE DOWN OR TO THE LEFT OR TO THE RIGHT




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving To Last Row In Worksheet
Hello all!
I am new to VB so need some simple help. How do I move to the next empty row with VB?
Many thanks for your help.

Moving A Bitmap To Left Or Right
i know how to move a bit map using a timer, for example

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
pic1.left = pic1.left + 1
End Sub


But i am more interested in using the vectors and velocity , acceleration which i know nothing about. can someone give me a little example of how to move pic1 to the left using them.
also what is a way to move a pic using directx 8 to the left. i'm planning on moving gifs around on screen.
which ever one takes up less ram is good i guess but it would be nice to know all three ways.
Thanks alot if anyone can help me with these little basics then hopefully i'll be able to move on to more complicated things.

A Better Way To Do This (moving Images To The Left)
Hi,

I have an array of Images (4) inside a picture box and want to move them by click all to the left - see attached screenshot.

The following code works but it looks ugly


Code:
Private Sub Command1_Click()
Dim lLeft As Long

lLeft = Image1(0).Left
Image1(0).Left = lLeft + Image1(0).Width
lLeft = Image1(1).Left
Image1(1).Left = lLeft + Image1(1).Width
lLeft = Image1(2).Left
Image1(2).Left = lLeft + Image1(2).Width
lLeft = Image1(3).Left
Image1(3).Left = lLeft + Image1(3).Width
lLeft = Image1(4).Left
Image1(4).Left = lLeft + Image1(4).Width

End Sub
Isnt there a better way to do this ??

regards

Ranma_at

Vb6-moving Text From Right To Left
hi everyone,

i was trying to make an welcome screen and i had this idea.
lets move text from right to left and when left is 0 then start right again.
this is my code:
Private Sub Timer1_Timer()
If t = 10 Then
Timer1.Enabled = False
End If
t = t + 1
licht (t)
Private Sub licht(t As Integer)

inp = "Terminator"
a$ = Left$(inp, t)
Text1.Text = a$
End Sub
what is wrong with it.
thank you for your time
greetings,
pascal

Findling Blank Textboxes And Moving Data.
Hi all,

As some of you know, I'm working on a project with a ton of textboxes. For this particular question, I have 23 textboxes named Rev1 all the way through Rev23 (no array). What happens is when all the 23 text boxes are filled with data, the user clicks a button and it does some filtering and removing of specific data, leaving some boxes blank when it's done. Later in the code, I have it write the values of all the textboxes on the form (not just the 23 from this group) write to a text file for input in to our work system. (It's actually writing to a .MMM file for an IBM program called CMMouse... which will then assist us in further transferring the written data to our "system" using IBM Personal Communication Emulators).
Anyway, due to the limitations of the system, I can't have any "spaces" in between the textboxes. What I need to do is compile some code to check for the blank boxes, and then figure out a method to sort/group all the boxes together. I've compiled the code to find the blank boxes (and store which boxes are blank in another variable array). All I need to do is the grouping together. I've been working on it for the last 4 1/2 hours and haven't made any more headway so I thought I would post for some ideas. Here's the code I have for checking the blank boxes:

Code:
For z = 1 To 23
If objCtrls("Rev" & CStr(z)).Value = "" Then
strBlank(z) = "Rev" & CStr(z)
End If
Next z

Because this is kind of hard for me to explain, I've attached an image. The top part is what it looks like after clicking the Filtering button. The bottom part is what I need it to look like.

***EDIT*** By the way, I have tried to just skip over the blank spaces when writing, but that won't work either. It needs to be grouped together.
***2ND EDIT*** The textboxes are placed flat over an image, thus the reason you can't physically see the text boxes.

Thanks all!

Moving The Totals Column To The Left
Hi all,

I have a pivot table and would like to move the totals column from the right, where it appears by default, to the left side of the table (but after the rowrange, the columns where the rows are defined).

Is there someone that knows how to do that?

Thanks a lot,

Gustavo

Moving An Image 1 Pixel Down And To The Left...quickly!
What would be the FASTEST way to move a picture for a screensaver down and to the left? is there an offset picture API?

Moving An Image With The Up, Down, Left, And Right Buttons On The Keyboard
can someone show me some smaple code that deals with moving an image with the up, down, left, and right buttons on the keyboard?

Moving Thru Multiple Textboxes With The Left And Right Keys
hi,
anyone have any ideas on how to move from a series of textboxes by using the keys? Such as if it was just one text box where you press the left or right arrow keys and it moves to the next textbox.

Moving From Cell To Cell By Pressing Enter
Hi,

I'd like to move from cell to cell (within the same row) by using Enter.
I've added following code in datagrid_Keyup event
Private Sub dgLines_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
dgLines.col = dgLines.col + 1
End If
End Sub
The problem is that the next cell value is getting the same value as previous cell but it hasn't.
Can somebody help?

Selective Moving Of Data From Active Worksheet To Other Worksheets
I am currently trying to copy/move data from the active worksheet to other worksheets.

My active worksheet contains the data which are input through a form. I would like to keep it that way. In addition, I would like to use the location as the criteria to make a duplicate of the data on the active worksheet and move it to the respective worksheets named by the respective locations.

Is there anyway to do it? I try to use If...then...else statements but seems like something is wrong with the code.

Hope someone could advise me. Thanks.

Moving To Exact Cell In Flexgrid
I am using a MSFlexgrid that I am having a text box float around so the grid can be editable. I was wondering if there was any way to go to an exact row,column combination. What I want to see is if there is any way to get around first doing flexgrid1.row = 2 then doing flexgrid1.column = 5. Is there any way to say go to 2,5 without moving to the row then to the column?

Thanks in advance.

Event Which Fires When Moving From One Cell To Another In Excel
How do I trap the lost focus event of a cell in Excel. In other words, which is the event that is fired when one moves from one cell to a different cell? Is it the Worksheet object's Change event?

2 Questions....Moving Active Cell And Counting
Okay, the first question
I have found a cell...now i just need to move 3 cells to the right and get that value.

How do I from a column, count how many of that specific number like

222
222
333
333
444
444
444



so 222 = 2
333 = 2
444 = 3

Any information would be greatly appreciated.

Event Which Fires When Moving From One Cell To Another In Excel
How do I trap the lost focus event of a cell in Excel. In other words, which is the event that is fired when one moves from one cell to a different cell? Is it the Worksheet object's Change event?

Event Which Fires When Moving From One Cell To Another In Excel
How do I trap the lost focus event of a cell in Excel. In other words, which is the event that is fired when one moves from one cell to a different cell? Is it the Worksheet object's Change event?

Event Which Fires When Moving From One Cell To Another In Excel
How do I trap the lost focus event of a cell in Excel. In other words, which is the event that is fired when one moves from one cell to a different cell? Is it the Worksheet object's Change event?

Memory Loss(mine) - Moving Excel Pointer To Name Of Cell.
VBA Macro....

if I want to move the focus (excel pointer, can't think of a better name) to a cell which I have renamed i.e from C1 to geoff.... how do I do this.... thought it would be just range("geoff").select but no.... and brain is failing me for how to do this....

thanks

How To Simuilate Moving Border When Copying A Cell Using A Grid, Like Excel Does.
I'm using VSFlexGrid, and I have an option to copy and paste cells, I want to simulate what excel does, when choosing copy in excel it creates a moving border around the cell....how do I do that in VB?.....the grid does not support that....HELP

Moving Balls To Moving Images??
Please take a look at this as it is related to my question
Thread

is it possible for the create images to be an image type that is already drawn?

Moving Items Between Listboxes Using &"instr, Right And Left&" Functions
Pls help........
I need help using instr, right , and left functions.
I got 3 list boxes, 1 called lstProduct, 1 called lstPrice and 1 called lstTrolley.
When I dbl click on any item in Product or Price it moves the selected item and corresponding price to the Trolley listbox.
What I need to do is , when I dbl click a selection in the Trolley listbox, I need it to seperate the text and move it back into their appropriate listboxes, e.g. "Apples 1.20".
I am new to VB programming so any help with coding would be greatly appreciated.
Thx......

Moving Code To Code Behind File Causing Weird Problem...
Hi, I'm wondering if anyone has seen this before...

I wrote an aspx page that had both code and html in the same file. It worked fine. So I decided I would try and move the code to a .vb code behind file so I could link the code to multiple pages without having to edit a million pages of code to fix one issue.

So I move the code over and check dependancies and everything else and it works except for one thing.

I have a radioButtonList that is populated as I loop through a sql datareader. In the first aspx file it adds listitems once and goes onto the rest of the sub. In the vb file however, it seems to be loading everything into the RBL twice. It's as if it is reading the entire sub two times or something.

Any idea what would cause this, and how I can fix it. I'm stumped!

Thanks,
Chris

Code For Moving A Row
Hi Guys, I need some help with a macro. New to this - so am a bit lost. Also first time using a forum

Firstly, I need code that will (in the attached file) either change the colour of the cell J and K, or preferably move the entire row to the bottom of the worksheet if cells J and K and not equal in value. This is a warhouse stock on hand worksheet.

Secondly, I need code that will move the entire row if cell N has other than the string "Available" in it.

Any help in this would be greatly apprecated. As said, the moving of the entire row is my preferable solution rather than higligting the particular row with colour as the printer is black and white.

Cheers

Moving C++ Code To VB
Hi EveryBody
I'm developing a tool to control a USB device. I'm moving some C++ code to VB, but since I do not c++ is a sort of difficult to do it. I will really appreciatte if you can hep me to do it. Here is the code.

'LPTSTR * GetDevMultiSz(HDEVINFO Devs,PSP_DEVINFO_DATA DevInfo,DWORD Prop)
'/*++
'
'Routine Description:
'
' Get a multi-sz device property
' and return as an array of strings
'
'Arguments:
'
' Devs - HDEVINFO containing DevInfo
' DevInfo - Specific device
' Prop -SPDRP_HARDWAREID Or SPDRP_COMPATIBLEIDS
'
'Return Value:
'
' array of strings. last entry+1 of array contains NULL
' returns NULL on failure
'
'--*/
'{
' LPTSTR buffer;
' DWORD size;
' DWORD reqSize;
' DWORD dataType;
' LPTSTR * array;
' DWORD szChars;
'
' size = 8192; // initial guess, nothing magic about this
' buffer = new TCHAR[(size/sizeof(TCHAR))+2];
' if(!buffer) {
' return NULL;
' }
' while(!SetupDiGetDeviceRegistryProperty(Devs,DevInf o,Prop,&dataType,(LPBYTE)buffer,size,&reqSize)) {
' if(GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
' goto failed;
' }
' if(dataType != REG_MULTI_SZ) {
' goto failed;
' }
' size = reqSize;
' delete [] buffer;
' buffer = new TCHAR[(size/sizeof(TCHAR))+2];
' if(!buffer) {
' goto failed;
' }
' }
' szChars = reqSize/sizeof(TCHAR);
' buffer[szChars] = TEXT('');
' buffer[szChars+1] = TEXT('');
' array = GetMultiSzIndexArray(buffer);
' if(array) {
' return array;
' }
'
'failed:
' if(buffer) {
' delete [] buffer;
' }
' return NULL;
'}
'

Moving All The Code To Classes
My main forms stays loaded and shown during the lifetime of my application. Since it has too many controls on it and to complicate things further have skins, it consumes much resources. Too many controls resulted in too many code on main form and it has a size of 249 KB.

I considered moving the code into organized modules but it won't do much good as these will be loaded to the memory as soon as main form loads. Now I am considering moving almost everyting to organized class modules. This way I think I can keep memory allocation by code to a minimum creating class instances and destroying them on demand. As I do not have a speed issue it sounds me reasonable. Although I know that my code will be way out of standards as I will not bother to build classes to act independently, they will contain direct references to controls and events in the main form. But again I do not care much about it as I am the only developer who needs to understand what my code does.

What is your idea about it ? This way I can bring my main form's size down to 100 k. Help me decide on it.Thanks.

Moving A Window Outside Of My Code
I am trying to figure out a good way to move an open window (not my own) to a different position on the screen.

ie. - I find my window I want to use in the taskbar, make sure it's got focus, and then move it to another position on screen (such as 0,0 top left). I can accomplish everything up to the move part. Everything I've seem to come across seems to involve moving just MY project window which is pretty simple to code in. I'm just in the start of learning API routines. Anyone have any suggestions? Thanx

Moving A Usercontrol From It's Code..
How would i go about moving a usercontrol from code inside itself (There is no .left or .top)?

I read somewhere that this can be done with .extender but had no luck when trying it. Thnx.

Moving The Mouse In Code
Does anyone know of any way to do this? For example, if you click on an picture control, have something in the code move your mouse pointer so that it is now in the exact center of the picture control? Any suggestions?

Code For Moving Items Up/down List Box?
Anyone know how to move items up or down the order in a list box. Thx

Moving VB6 Code From Module To Form
Hello

Quick question...

I am trying to move this code from a module to my form, but as soon as I change the frmAverage to Average - I get the message Compile error invalid qualifier. I have a public variable of Average declared in my module so can you tell me what I'm doing wrong?

Private Sub cmdOperation_Click(Index As Integer)
Select Case Index
Case 0 'The TOTAL button
txtNumber(3).Visible = True 'Place the text box in the right place
txtNumber(3).Top = cmdOperation(Index).Top
txtNumber(3).Text = Str(TotalNumber) 'The module function call
Case 1 ' The AVERAGE button
txtNumber(3).Visible = True 'Place the text box in the right place
txtNumber(3).Top = cmdOperation(Index).Top
txtNumber(3).Text = Str(AverageValue) 'The module function call
Case 2 'The SORT button
txtNumber(3).Visible = False
SortNumbers
For i = 1 To 3
frmAverage.txtNumber(i - 1) = Str(Number(i))
Next


Case 3 'The CLOSE button
End 'To end the application
End Select
End Sub

Thanks for your help......

Tracey

Moving A Report Page In Code
Is there any way to move to another page in code?

Moving Mouse Cursor With Code
I am trying to make the mouse cursor move by using code so that the cursor will move by itself at set intervals. Any ideas would be great.

Moving Or Saving A .mdb File To Another Folder Code
eiy guys,, i need a code that will move or save as my database.mdb
located on C:

and move it to D:/backup/

please give me the code and the proper preferences to click

please email me at pwedepobangmagtanong@yahoo.com

Delete Worksheet, Then Create New Blank Worksheet With Same Name
Hi

I have a worksheet named "Harmonics", where I present to the user the results from my VB program.

But when the user re-runs the macro, I want to ensure that ALL the data on the worksheet is overwritten and no 'old' data is still there.

I thought the best way to do this would be to delete the entire worksheet at the start of the program then re-create the worksheet as a blank document ready for writing to. Is this a bit extreme? Would I be better to just delete all cells within the worksheet as opposed to the sheet itself?

Your help would be most appreciated.

And of course, some code to do what I want would be great!

Thanks,
Daryll

Writing A Cell Address Of A Cell In 1 Worksheet To A Cell In Another In Same Workbook
Hi……..
Its an urgent requirement….
I have an excel sheet. I need to write the macros in VB for the following requirement:
There are three worksheets in a single workbook.. worksheet3 contains some values in every cell. whenever user writes in something in the cell in worksheet1, the column number and row number from worksheet3 must get written automatically in the adjucent cell in worksheet1 only.

For example:
A worksheet 3 contains PLZ A,B in row 5 and column 7. These rows and columns are user defined. If i write PLZ 31, 20 in F26 in worksheet 1 then automatically G26 must contain value 75, G27 must contain a value 31 and G28 must contain a value 20.

I can't say when this value should get populated. Either on the lost focus of F26 or i need to run a macro manually for F26.
 what would be the code in both the cases? Is the former case possible? If i select group of cells like F26 present in worksheet1 and altogether run a macro then would it give the result?

Thanks in advance for your reply.
Regards...
Priyadarshini

To Determine The Rows To Paste A Worksheet(blank Cells To Paste Next Worksheet)
hi all experts out there....

would llike u guys to help out with a problem i am facing....


the code below is to select each of the worksheet,copy it and paste it in worksheet (printer").....i got 3 worksheets to paste into worksheet ("printer")....worksheet("11 aug"),("12 aug") and ("18 aug")....i got no problem pasting the first two worksheets("11 aug") and ("12 aug")...but i got a problem pasting the last worksheet("18 aug").....i want to paste each worksheet with a offset of (3,0) but the last worksheet paste at another cell instead......i attach the excel doc name (total)(workbook) and the macro.....the ("sub regroup")....need to be improve..pls help ......thank a lot..."P

Code:
Sub regroup()
'
' regroup Macro
' Macro recorded 9/3/2003 by SGTANCKE
'

'
Sheets("11 Aug").Select
Rows("1:" & Sheet1.UsedRange.Rows.Count).Select
Selection.Copy
Sheets("Printer").Select
Range("A1").Select
ActiveSheet.Paste

Sheets("12 AUG").Select
Rows("1:" & Sheet2.UsedRange.Rows.Count).Select
Selection.Copy

Worksheets("Printer").Activate
ActiveCell.Offset(rowOffset:=3 + Sheets("Printer").UsedRange.Rows.Count, columnOffset:=0).Activate
ActiveSheet.Paste

Sheets("18 AUG").Select
Rows("1:" & Sheet3.UsedRange.Rows.Count).Select
Selection.Copy

Worksheets("Printer").Activate
ActiveCell.Offset(rowOffset:=3 + Sheets("Printer").UsedRange.Rows.Count, columnOffset:=0).Activate
ActiveSheet.Paste


Columns("E:E").EntireColumn.AutoFit




End Sub

Find Cell, If X=true, Edit Cell One To The Left
Howdy..

The title pretty much says it all.
What I am trying to do is if, lets say, cell B2 contains "bar" anywhere in it, I want cell A2 to have "BAR" written in it.

Since the last time I did Visual Basic was in grade 10, and it was very basic (hehehe pun) material, I am somewhat lost here.

Thank you,

Vladicus

Insert Cell Format & Get Cell Value Without Selecting Worksheet
Hello
       I am trying to tidy up a workbook. I have several macro's, one of them insert a new line with different cell formats in to different worksheets and most of the others get a cell values for creating reports.

The only way I know of inserting / getting a cell value is to select the worksheet and run the macro

        Sheets("Works Schedule").Select
            
        ' Run code

This way works but is their a way of running the macro with out selecting the worksheet to stop the workbook flickering between each sheet whiles the macro is running


Thanks
          Tom

Stop Code From Moving On If &"IF&" Statements False [Solved]
hi, i want to verifi the first two boxes before it moves onto the rest of the code so if any of the first two if statements are false it doesnt move onto the rest of the code, any 1 have any ideas?

thx much appreachiated


Private Sub cmdcal_Click()

If cboCars = "" Then MsgBox "Error Msg Here"
If txtdays = "" Then MsgBox "Error Msg Here"

lbltotal = lblPrice * txtdays
lbldeposit = (lbltotal / 100) * 20
lblPay = lbltotal - lbldeposit

End Sub

Counting From Right To Left Until A Blank
I’m trying to count from right to left, until a blank cell occurs in a row, if it does occur, stop the count and insert the value into column Y.


I’ve managed to get hold of the following VB Script, but nothing seems to happen when it is run, can any body help with this?

Code:
Sub CountFromRightToFirstBlank()

Dim lngCol As Long
Dim lngRow As Long
Dim lngLastRow As Long
Dim lngCount As Long

'Considering that Column A always have value
lngLastRow = Cells(Rows.Count, "A").End(xlUp).Row
'the last col that will be counted
lngCol = 18

'start counting from row 2
For lngRow = 2 To lngLastRow
'loop from col E,D,C, B
'you can change the condition that suit you
Do Until Cells(lngRow, lngCol).Value = "" Or lngCol = 0
lngCount = lngCount + Cells(lngRow, lngCol).Value
lngCol = lngCol - 1
Loop

'At last, if there is value in the count,
'write the result in column F
If lngCount <> 0 Then
Cells(lngRow, "Y").Value = lngCount
End If
lngCount = lngCount
lngCol = 18
Next

End Sub
Background Info:
Example:

Column A always has data (July 05)

Column B to S is a lookup into different months, so B=July 04 and S=Dec05. I’m looking up if the Policy number in July 05 is in July 04 - Dec 05.

Column Y has the definitive number

I need to age the case, as I don’t have any dates/timestamps. Its not a matter of count all the policy numbers, which came up from the lookup, because the policy number may appear in July 04, August 04, Sept 04 and then not show up until May 05, June 05, July 05, which would make the case 3 months old rather than 6 months old.
This is why I need to count from right to left, so it can stop until a blank.

Thanks
Edit by italkid: Please use the [vb]][ and [/vb] tags to display your code, and post your threads in the proper forum, thanks.

Appending Data From A Cell To Another Cell In Another Worksheet
I'm automating excel using vb 6.0. The code appends the result of a select statement on to an excel file. This is a daily routine and data changes everyday. Is there a way of appending data from a cell and permanently storing it to another worksheet.
E.G.
DAY1
In worksheet 1 cell A1 contains the number 75 .. i wish to append it to Worksheet 2 cell A1

DAY2
In worksheet 1 cell A1 contains the number 85 .. i wish to append it to Worksheet 2 cell A2

.... and so on .. Worksheet 1 changes daily. Worksheet 2 should be filled with data everyday (filling up A1, A2, A3)

Thanks In Advanced

Checking For Fields That Are Left Blank
I have a simple error-checking feature which checks for fields that are left blank. The following code yields to the following screen output (see attached image):


Code:
If txtUserID.Text = "" Or txtPassword.Text = "" Then
Dim missinginfo As String
missinginfo = ""

If txtUserID.Text = "" Then
missinginfo = " - User ID"
End If

If txtPassword.Text = "" Then
missinginfo = " - Password"
End If

If missinginfo <> "" Then
missinginfo = "_____________________________" & vbCrLf & "You failed to correctly fill in the:" & vbCrLf & missinginfo & vbCrLf & "_____________________________" & vbCrLf & "Please re-enter and submit again."
MsgBox missinginfo
End If

However, instead of displaying that both User and Password fields are left blank, only the Password is indicated. I think the value of missinginfo is being overridden by the succeeding If statement. How do I remedy this?

Thanks.

Checking For A Blank Worksheet
Visual Basic 6.0/Excel 2000

Can anyone tell me if there is a macro statement that will test to see whether a particular worksheet is blank?

I'm copying data from one workbook into another workbook that has several dated worksheets. Obviously, I don't want to copy data into a worksheet that is already "Occupied".

Thanks

Differentiating Between A Blank Cell And A Cell With A Value Of Zero
is there anyway to do this?

I have some cells that have a simple subtraction formula in them and I would like the macro to recognize these cells when their value becomes "0", but not blank ones (because no data was ever entered into them).

Right To Left Worksheet
Hi all,
I'm creating an excel work book using VB code, and add to it some worksheets. I want the worksheets be displayed from right to left. I used the DisplayRightToLeft property on the code (setting it to "true"), but when I'm opening the created worksheets, I see that it didn't have any effect, and the worksheet is still left to right (when I press the button manually in the excel, it displayed right to left alright, but not through the code).
Does anyone have any idea?
Shay

Remove Blank Excel WorkSheet
Hi All,

How to delete blank(no data) worksheet in Excel programatically--(using VB.NET or C#).

Kindly respond!.Thanks in Advance.

Regards,
Vipin

Display Certain Cell As The Top-left Most Cell
hi everybody, do u know how to display certain cell as the top-left most cell whenever i wanna open /activate certain sheet?
eg . i wanna have "E10" appeared at the position of the orginial "A1"
thanks in advance

Hobee

Setting Focus To Field Left Blank (part II)
Hello
I am trying to set Focus on the field that is False and clear them out (Cls). ie
TypeIsValid = False
MsgBox "Please enter a valid selection"
txtType (four more other txtBoxes).SetFocus
I would like to keep it here if possible(?)

I have it set up for mispellings in the txtType box but I can't seem to get the hang of blank fields and obviously the field that is invalid

the fields that are valid look like this:
If (txtType.Text = "ADULT" ) Or (txtType.Text = "CHILD" ) Or (txtType.Text = "STUDENT" ) _
Or (txtType.Text = "SENIOR" ) Or (txtYoga.Text = "y" ) Or (txtYoga.Text = "n" ) Or (txtKarate.Text = "y" ) _
Or (txtKarate.Text = "n" ) Or (txtKungFu.Text = "y" ) Or (txtKungFu.Text = "n" ) Then
TypeIsValid = True

Rob

Insert Multi-Dimensional Array Into Blank Worksheet
Hey, I have a multidimensional array (of varying size) that I'd simply like to insert into a blank worksheet in my workbook. I didn't know if there was some tricky way to do it with ranges or whatnot, and I also didn't know if the varying size would matter. Is there a way to just insert the entire array into cells, starting with A1?

Thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved