Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think Inafiziger has solved your main issue, it should be a vanilla <code>Save</code>.</p> <p>As it was unclear to me exactly what your are doind (ie Visual Studio/VB/BA) then</p> <p>On (1)</p> <p>I thought it worth clarifying that you can use code <em>inside</em> the <code>ThisWorkbook</code> module to detect and handle a <code>SaveAs</code> if you are providing users with a choice. This Event detects the <code>SaveAs</code> and cancels it</p> <pre><code>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then MsgBox "You cannot use SaveAs to save this file", , "Save Cancelled!" Cancel = True End If End Sub </code></pre> <p>This code can be programmatically added to your target workbook but I doubt you would need to resort to this given you should be able to run the simple <code>Save</code>.</p> <p>On (3)</p> <p>You need to use <a href="http://www.jpsoftwaretech.com/excel-vba/early-late-binding/" rel="nofollow">Early Binding</a> to get the benefit of <code>intellisense</code>. You are currently use late binding with <code>oExcel = CreateObject("Excel.Application")</code>. A commonly used approach is to write the code and get it working with early binding, then converting it to late binding for final code publication. </p> <p><a href="http://www.jpsoftwaretech.com/take-advantage-of-intellisense-when-writing-late-bound-code/" rel="nofollow">Conditional Compilation</a> (see comment at bottom) can be used to switch between the two binding methods within the same code.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload