+ Reply to Thread
Results 1 to 4 of 4

share Workbook

  1. #1
    Registered User
    Join Date
    05-20-2014
    MS-Off Ver
    2016
    Posts
    82

    Post share Workbook

    Hello
    Password VBA 7230
    Can i share workbook to other users, add dataentry on same sheet and the other user can click the printing button and the information print out.

    i use this code and is working ok, but when i share to others save and delete the last add. thank you for advance.

    To Print

    12-19-15 Replacement OC.xlsm
    Private Sub Image3_Click()

    Dim rng As Range
    Set rng = Range("Audit1")
    With rng
    .Offset(-2, 0).Resize(.Rows.Count + 1, .Columns.Count).PrintOut
    .ClearContents
    End With



    End Sub

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: share Workbook

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-20-2014
    MS-Off Ver
    2016
    Posts
    82

    Re: share Workbook

    Here are code


    Formula: copy to clipboard
    =OFFSET('DataBase Packing'!$AJ$3,0,0,(COUNTA('DataBase Packing'!$AJ:$AJ)-1),10)

    This Code has been added or modified:

    Clear the contents of Named Range PackingPrintRange


    copy to clipboard
    Private Sub UserForm_Activate()
    Range("PackingPrintRange").ClearContents
    End Sub
    Modify to populate the Named Range PackingPrintRange


    copy to clipboard
    Private Sub CommandButton1_Click()
    Dim LastRow As Range
    Dim rng As Range
    Dim LR As Long
    Dim ws As Worksheet
    Set ws = Sheet2
    Set LastRow = Sheet2.Range("a65536").End(xlUp)
    LastRow.Offset(1, 1).Value = TextBox1
    LastRow.Offset(1, 2).Value = TextBox2
    ''LastRow.Offset(1, 4).Value = Format(TextBox2)
    LastRow.Offset(1, 3).Value = TextBox4
    LastRow.Offset(1, 4).Value = TextBox5
    LastRow.Offset(1, 5).Value = TextBox6
    LastRow.Offset(1, 6).Value = TextBox7
    LastRow.Offset(1, 7).Value = Format(Now, " yyyy.mm.dd ")
    LastRow.Offset(1, 8).Value = Format(Now, " HH:MM:SS ")

    LastRow.Offset(1, 0).Value = ComboBox1

    Set rng = Range("PackingPrintRange")
    With rng
    LR = rng.Row + rng.Rows.Count - 1
    End With

    ws.Cells(LR, "AJ").Value = Me.ComboBox1.Value
    ws.Cells(LR, "AK").Value = Me.TextBox1.Value
    ws.Cells(LR, "AL").Value = Me.TextBox2.Value
    ws.Cells(LR, "AM").Value = Me.TextBox4.Value
    ws.Cells(LR, "AN").Value = Me.TextBox5.Value
    ws.Cells(LR, "AO").Value = Me.TextBox6.Value
    ws.Cells(LR, "AP").Value = Me.TextBox7.Value
    ws.Cells(LR, "AQ").Value = Format(Now, " yyyy.mm.dd ")
    ws.Cells(LR, "AR").Value = Format(Now, " HH:MM:SS ")
    ws.Cells(LR, "AS").Value = Me.TextBox3.Value

    TextBox1.SetFocus
    TextBox1.Text = ""
    TextBox2.Text = ""
    TextBox3.Text = ""
    TextBox4.Text = ""
    TextBox5.Text = ""
    TextBox6.Text = ""
    TextBox7.Text = ""
    'MsgBox "New item has been added to the list."
    'Unload Me
    ActiveWorkbook.Save
    End Sub
    Print out the Named Range PackingPrintRange


    copy to clipboard
    Private Sub CommandButton3_Click()
    Dim rng As Range
    Set rng = Range("PackingPrintRange")
    With rng
    .Offset(-2, 0).Resize(.Rows.Count + 1, .Columns.Count).PrintOut
    .ClearContents
    End With
    ' UserForm2.Show
    End Sub

  4. #4
    Registered User
    Join Date
    05-20-2014
    MS-Off Ver
    2016
    Posts
    82

    Re: share Workbook

    Can someone help, please

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] cannot share workbook with macro pulling data from another workbook
    By Ramzes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-10-2015, 10:32 AM
  2. Replies: 2
    Last Post: 07-29-2013, 12:19 PM
  3. Not able to share workbook
    By bibleguy125 in forum Excel General
    Replies: 9
    Last Post: 09-26-2011, 09:42 AM
  4. Share workbook
    By Leentje in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2006, 05:25 AM
  5. Replies: 4
    Last Post: 04-24-2006, 02:00 PM
  6. [SOLVED] share workbook
    By G in forum Excel General
    Replies: 4
    Last Post: 12-09-2005, 12:55 AM
  7. How to create new workbook and share the workbook through vb script?
    By sam22_blr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2005, 01:47 AM

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