Jump to content
Fórum Script Brasil
  • 0

Nome do arquivo a ser salvo com o valor de uma variável.



Prezados amigos,

Sub nome_do_arquivo_=_data_atual()

'Dim dia As String

'Dim ano As String

'Dim mes As String

Dim LValue As String

Dim data As String

LValue = Format(Date, "yyyy/mm/dd")

Range("A1").Offset(1, 0).Value = LValue

data = Selection.NumberFormat = "[$-416]d mmmm, yy;@"

'gostaria que o arquivo salvasse com o nome da variável "data" ....Como eu faço ?'

Workbooks.Open Filename:= _

"Y:\marketing\Gerência\Resultados\Panorama de Campanhas\Panorama Geral de Campanhas_20121213.xlsx"



Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False

Sheets("TB DIM").Select

ActiveSheet.PivotTables("Tabela dinâmica1").PivotCache.Refresh

ActiveWorkbook.SaveAs Filename:= _

"Y:\marketing\Gerência\Resultados\Panorama de Campanhas\data.xlsx", _

FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False


End Sub

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...