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: 246
Default ....SPOT THE USERFORM!!!!.....

I have the following little routine:

'===================
Private Sub CmdSelectData_Click()
Me.Hide
Call SelectDataRow
Me.Show
End Sub
'===================

All looks fairly standard!

The called routine, "SelectDataRow", is the following:

'===================
Sub SelectDataRow()
'finds the last used row in the sheet that the user presently
has active
Dim LastUsedRow As Integer
LastUsedRow = ActiveSheet.Cells(Rows.Count, 8).End(xlUp).Row

'get the user to select a row of data for moving to the Log
Application.Calculation = xlCalculationAutomatic
On Error Resume Next
Set InvoiceRange = Application.InputBox("Either: " & vbCrLf & _
"1.Confirm the present selection by hitting OK" & vbCrLf & _
"2.Select a cell in another row and hit OK" & vbCrLf & _
"3.Hit CANCEL to stop the macro here", _
"RELEVANT PAYMENT INFORMATION", "A" & LastUsedRow & ":L" & _
LastUsedRow, , , , , 8)
On Error GoTo 0

'if nothing has been selected on the activesheet then this is
flagged to the user
If InvoiceRange Is Nothing Then
MsgBox "No cells on the ACTIVESHEET have been selected"
End If

End Sub
'===================


The above looks pretty standard to me aswell. The problem is that when
the code has run the routine SelectDataRow and then hits the line
Me.Show the userform appears in a different position on the screen!! Do
I need to change one of the userform's property's in Design Time - or
will I need to write some extra code to be executed in run time?

Any help greatly appreciated,
Jason.

 
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
X marks the spot BlueFeather Excel Discussion (Misc queries) 2 December 11th 08 11:18 AM
Hosur an IT hot spot? [email protected] Excel Worksheet Functions 0 October 17th 07 03:47 PM
2 printers 1 does not print name in same spot Cuppa T Excel Discussion (Misc queries) 0 July 22nd 06 03:51 AM
X marks the spot Optitron[_11_] Excel Programming 2 September 20th 05 06:38 PM
I want a name in one spot and it's code in another TwoWheelDemon Excel Discussion (Misc queries) 1 March 17th 05 04:31 PM


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