Scan fails to start on designated cell

ChuckDrago

Active Member
Joined
Sep 7, 2007
Messages
470
Office Version
  1. 2010
Platform
  1. Windows
Hi everyone,

I have a worksheet that accepts scanned data from bar coded cards. The records are parts to be ordered and they include their responsible buyer.
I have provided additional functionality, whereby the data can be sorted by buyer, emails are sent to them with their allocated parts requirements and finally the data is uploaded to a Kanban Master File.
The method I used to allow users to select the required functionality is by a UserForm containing buttons to execute the required functions.

When instantiated, the worksheet places the focus on the first available row (below the header) and on the first column. The UserForm is not active and you can scan data without any problem. When finished scanning, there is a call button to display the form modeless and the user can start executing the varouis functions without a hitch.

However, if the user calls the UserForm before scanning, then the application behaves erratically (e.g. a scan attempt results in jumping to another worksheet, without any data collected). Now, if you call the UserForm before scanning and click on the first available cell before starting the scan then the data is collected OK.

I want to avoid the need for clicking on the starting cell. What I tried thus far is this code on the call to the UserForm:
<pre><code>
Sub CallPanel()
With CPanel
.StartUpPosition = 0
.Top = 450
.Left = 350
.Show Modeless
End With
Dim xRow As Integer
xRow = Range("C34").End(xlUp).Row
Range("C" & xRow + 1).Activate
End Sub
</code></pre>
The activation statement does not suffice to do the trick (it appears that the UserForm still has the focus). Any ideas?
As always, much obliged to all.
Chuck
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top