Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go Column A, but remain on the same row! 3

Status
Not open for further replies.

APElliott

Technical User
Jul 9, 2002
165
GB
Hello,

What would the code be to go to column 'A' from any column, but remain on the same row.

Thankyou,

Andrew
 
Application.Goto _
Reference:=ActiveSheet.Range("A" & ActiveCell.Row) Regards
BrianB
** Let us know if you get something that works !
================================
 
Cheers Brian!

I've not tried yours yet, but Tranpkp's solution is working great!

PS Do you know how to print a userform and its contents by the uses of a button on the userform!

Nobody seems to know!

Regards,

Andrew
 
Use the Printform method of the userform

UserformName.Printform

should work Rgds
~Geoff~
 
Cheers Geoff,

This only prints the form though and not the contents of the textboxes on the form too.

How do you set the print settings too?
 
Dunno - never used it before - just looked at the object model for userforms and came up with it. If it doesn't print values, I would suggest that you may need a workaround along the lines of either
1: an API call to reproduce SHIFT+PRINTSCRN
2: a worksheet set up to look like the form, with cells for textboxes etc. Use the print button on the form to populate these cells and then print the worksheet representation of the form

HTH Rgds
~Geoff~
 
Cheers Geoff
I like your second idea - how do i get a cell to equal the contents of a textbox on a userform.

Regards,

Andrew
 
If you are using a button to print, just do it in code
Sheets("FakeForm").range("A4").value = me.textbox1.text

etc etc Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top