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: 1
Default Selecting the next blank cell.

I have a user form where I want to put the data into a spreadsheet and keep
adding to it. Basicly, to quantiitize a report for sales people. I need to
add the new data to the next blank row.
I have it now adding to a single row, but I need it to find the next blank
row and write the new data there. Either that, or there is a much easier way
that I'm not doing it! Thanks,

Private Sub OK_Click()

Dim MyRange As String

WE1 = "A5"
MyRange = WE1.Value
Range(MyRange).Value = WeekEnding.Text

OC1 = "B5"
MyRange = OC1.Value
Range(MyRange).Value = OutgoingCalls.Text

IS1 = "C5"
MyRange = IS1.Value
Range(MyRange).Value = IncomingCalls.Text

OE1 = "D5"
MyRange = OE1.Value
Range(MyRange).Value = OutgoingEmail.Text

IE1 = "E5"
MyRange = IE1.Value
Range(MyRange).Value = IncomingEmail.Text

Con1 = "G5"
MyRange = Con1.Value
Range(MyRange).Value = Conversation.Text

Mes1 = "H5"
MyRange = Mes1.Value
Range(MyRange).Value = Message.Text

Ded1 = "I5"
MyRange = Ded1.Value
Range(MyRange).Value = DeadCall.Text

PC1 = "K5"
MyRange = PC1.Value
Range(MyRange).Value = ProductionCompany.Text

CAT1 = "L5"
MyRange = CAT1.Value
Range(MyRange).Value = Catering.Text

VEN1 = "M5"
MyRange = VEN1.Value
Range(MyRange).Value = Venue.Text

WP1 = "N5"
MyRange = WP1.Value
Range(MyRange).Value = WeddingPlanner.Text

ENT1 = "O5"
MyRange = ENT1.Value
Range(MyRange).Value = Entertainment.Text

CORP1 = "P5"
MyRange = CORP1.Value
Range(MyRange).Value = Corporations.Text

ORG1 = "Q5"
MyRange = ORG1.Value
Range(MyRange).Value = Organizations.Text

RFP1 = "s5"
MyRange = RFP1.Value
Range(MyRange).Value = RFP.Text

EB1 = "T5"
MyRange = EB1.Value
Range(MyRange).Value = EventsBooked.Text

Unload Me
End Sub

 
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
A basic Macro: going to a particular Worksheet and then selecting thefirst blank cell in column A Mike C[_5_] Excel Programming 2 February 25th 08 01:30 AM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... [email protected][_2_] Excel Programming 2 June 7th 07 09:27 PM
Selecting the first blank cell in a column BZeyger Excel Programming 1 April 17th 07 05:41 PM
Selecting the first non blank cell in Range VBA Noob Excel Worksheet Functions 2 July 24th 06 07:39 PM
selecting the last non blank row. reefguy Excel Programming 5 April 14th 04 05:23 PM


All times are GMT +1. The time now is 06:54 AM.

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"