Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. save as a particular name

save as a particular name

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Does anyone know how I might use a button on a form to save spreadsheets into a named directory and to pick from the spreadsheet the save as name? Ie each time it is opened it will be given a unique id no by the user into a particular cell on the sheet. I would like to be able to click on a button to close the spreadsheet and save it as the id no in a name directory - say c:/mydocuments. So my directory will fill up with lots of uniquely named spreadsheets. The unique id no would be held in cell B6 many thanks in advance

    L 1 Reply Last reply
    0
    • L Lost User

      Does anyone know how I might use a button on a form to save spreadsheets into a named directory and to pick from the spreadsheet the save as name? Ie each time it is opened it will be given a unique id no by the user into a particular cell on the sheet. I would like to be able to click on a button to close the spreadsheet and save it as the id no in a name directory - say c:/mydocuments. So my directory will fill up with lots of uniquely named spreadsheets. The unique id no would be held in cell B6 many thanks in advance

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You can record a macro bu trouble is when recording a macro you cant use the cut and paste functions properly. I know that I want to do: siv = ActiveSheet.Cells(6, 2).Value ActiveWorkbook.SaveAs Filename:="C:\My Documents\"&siv".xls", FileFormat:= xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False but of course it doesnt like me stuffing the siv variable in like that so I am snookered. There is the save method NewBook.SaveAs Filename:=fName so I can swap fname for siv, but this doesnt let me state where it has to be saved :eek:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups