LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Syntax Fpr Range Command

Greetings,

I have two subs to put data from some TextBoxes (TB1 thru TB34) on a
UserForm onto a row on a sheet.

The first sub places the data in the first empty row - this one works.
Here is the code:

With Range("A65536").End(xlUp)
For i = 1 To 34
.Offset(0, i).Value = _
Me.Controls("TB" & i).Value
Next i
End With

The other sub is supposed to overwrite the row chosen from a ComboBox.
These two subs are identical except for the choice of which row to put
the data into.
Here is the second sub:

vRowToModify = CB1.ListIndex + 1

With Range("A" & vRowToModify)
For i = 1 To 34
.Offset(0, i).Value = _
Me.Controls("TB" & i).Value
Next i
End With

The variable vRowToModify does return the correct row number but I'm
not sure how to use it. the Range statement is not right and that is
messing up the sub

Can someone help me with the syntax of this "With" statement? Nothing
I have tried works.

Any help is greatly appreciated,

-Minitman
 
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
If syntax to test if command button exists mikeburg[_36_] Excel Programming 1 September 30th 05 01:48 AM
EXCEL command or syntax PCOR Excel Programming 4 March 11th 05 10:01 PM
Syntax for Excel variable using a SQL Select/From/Where Command... Chip Pearson Excel Programming 0 September 8th 04 11:15 PM
Command text syntax and comma Dave Excel Programming 1 July 30th 04 07:47 PM
Correct syntax for use Replace command via DDE? Bjørn Holm Excel Programming 4 November 27th 03 01:07 PM


All times are GMT +1. The time now is 01:52 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"