Results 1 to 5 of 5

whenever i submit button it opens an workstation files where user details there i dont wan

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    whenever i submit button it opens an workstation files where user details there i dont wan

    it always opens the workstation file whenever i submit the details why

    But i dont want that file(workstation) should open whenever i submit my details

    i have attached my sheet

    please let me know

    Private Sub cmdbt1_Click()
    Dim irow As Long
    Dim ws As Worksheet
    
    
    Dim info
    info = IsWorkBookopen("\\bms\Service log request\login details\workstation.xlsx")
    
    
    'we open the workbook if it is closed
    If info = False Then
    Workbooks.Open ("\\bms\Service log request\login details\workstation.xlsx")
    
    
    End If
    
     Set ws = Worksheets("sheet1")
    
    'Find first empty row in database
    irow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, _
    SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
    
    
    
    'Check for a Name number
    If Trim(Me.TextBox1.Value) = "" Then
    Me.lbl2.SetFocus
    End If
    
    'Copy the data to the database
    ws.Cells(irow, 1).Value = Me.lbl2.Object
    ws.Cells(irow, 2).Value = Me.lbl4.Object
    ws.Cells(irow, 3).Value = Me.lbl6.Object
    ws.Cells(irow, 4).Value = Me.TextBox1.Value
    ws.Cells(irow, 5).Value = Me.TextBox2.Value
    'Me.lbl2.Name = ""
    'Me.lbl4.Name = ""
    Me.TextBox1.Value = ""
    Me.TextBox2.Value = ""
    
    Me.TextBox1.SetFocus
    
    
    
    
    MsgBox "welcome to bms"
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] \\bms\Service log request\login details\workstation cannot. Check your spelling or try a d
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2014, 10:40 AM
  2. Replies: 0
    Last Post: 02-05-2014, 08:25 PM
  3. Replies: 1
    Last Post: 02-05-2012, 09:31 PM
  4. Clicking a submit button after macro opens webpage.
    By CJPHX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-09-2010, 08:55 AM
  5. Create a Submit button save filename as A1, submit email unc path, etc.
    By briant97 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-30-2009, 09:52 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1