View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_14_] Bob Phillips[_14_] is offline
external usenet poster
 
Posts: 216
Default Form, or seperate text boxes?

You could attach a similar bit of code to a button, and use it like so when
you click the button

Sub MyMacro()

With Activecell
If .Column = 1 Then
'you can now get other fields
MsgBox .Offset(0, 1) 'column B
MsgBox .Offset(0, 2) 'column C
MsgBox .Offset(0, 3) 'column D
'etc.
End If
End With

End Sub


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"pianoman" wrote in
message ...

Hi Bob,
Thanks again, that works fine when the data is there already...
However I need it to do what ever it's going to do on a button click
really. I run code to refresh the sheet with data from several
sources, and at the moment, the Worksheet_selectionchange part is
kicking in before the data is refreshed, which crashes the macro.

Also, I'm not sure this is going to solve my problem is it? let me
re-iterate in case I wasn't clear first time round! :)
I need to be able to choose a name from a list (sourced from column a),
presumably record the row number for that name or something, then input
dates into two different input fields, record those values and then run
seperate code to jump to the master data sheet, enter those values into
the relevant columns in the row number recorded from the form earlier.
Does the code you've given me get me closer to that goal?

Thanks


--
pianoman
------------------------------------------------------------------------
pianoman's Profile:

http://www.excelforum.com/member.php...o&userid=33712
View this thread: http://www.excelforum.com/showthread...hreadid=544994